-
Notifications
You must be signed in to change notification settings - Fork 142
Remove override of title in the init site
#2128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks @lhw-1, though slightly unrelated, I was thinking if we could illustrate the various ways of using the title by making use of the rest of the pages in the template. For example, if you look at https://markbind-init-typical.netlify.app/contents/topic1.html |
Once this PR gets merged, we would be switching to only declaring the I'll create a new PR afterwards to make necessary changes to the topic pages (or at least open a new issue on it). Thanks for the suggestion @tlylt! |
Just to clarify, I was thinking to illustrate all usage of the Perhaps @damithc can share if that's too much for a new user? If so we can stick with one usage. |
w.r.t. illustrating different usages in the init site, perhaps we should limit to illustrating variations that have visible differences in the page and are of interest to first time users? This is because the user is likely to use the generated site as the starting point for their own site. If we put too much stuff in it, the user will have to do a lot of clean up first. What do you guys think? |
Ah, I see what you mean. I agree with @damithc that this might not be much use for new users as it won't have visible impacts, and it may also have adverse effects where it could be confusing for the new users if there are three documents each with different ways of declaring But I get the idea that perhaps this can also be useful for those who want to learn about the different methods of declaring E.g., changing the contents of the warning box in the section from:
To:
And then perhaps we can also add a tip for advanced users telling them that this feature could allow them to serve the same page with multiple titles if the page is being served from a submodule, as originally mentioned in #242 as the reason for why there are two ways to declare |
Sure, add a link to the title property in site.json as well so that users can navigate there easily.
Let's not add the comment and keep to the frontmatter usage. Having this is better as it looks nicer with some default title and it's easy to change.
This is good point, the rationale might be of interest to potential users, possibly add this in reuse-content. |
|
Thanks for the suggestions @tlylt, will update with those changes in mind! |
|
Documentation has been updated with the suggestions by @tlylt! |
title in the init sitetitle in the init site
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally think we can add an explicit example to this section of the userGuide to showcase how this might work. Or maybe point to some existing examples so that first-time users won't be too confused.
Something simple like an extract of the siteData as well as the frontmatter would suffice.
Also as a side note, this should be a Documentation update not a feature addition :>
| <meta name="generator" content="MarkBind 4.0.2"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <title>Landing Page</title> | ||
| <title></title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should look into removing this empty title tag as it holds no value, either in a separate PR (feel free to create an issue for this - if it doesn't exist) or in this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I was planning to open a new issue / PR for cleaning up the default / minimal site templates, so I will include this as part of the new issue 👍
I've added an example in f398db4!
PR has been updated accordingly 👍 |
tlylt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lhw-1, LGTM.
What is the purpose of this pull request?
Overview of changes:
This PR resolves #242.
While the original issue was opened before PR #935 which overhauled the site created on
markbind initto the template currently being used, the issue was not closed, even though the main issue of duplicate declaration oftitleis no longer a problem, as thetitleinindex.mdwas removed in PR #935.Modifications were made as per the suggestion made in the original issue to have the starter site use the typical technique (i.e.
titleis declared within thefrontmattertag in the.mdfile) instead of declaring it insite.json, as declaring thetitleinsite.jsonwill override the one declared within thefrontmattertag.Once it's been checked that no documentation needs to be updated, the [WIP] will be removed from the title of the PR.
Anything you'd like to highlight/discuss:
Testing instructions:
Running
markbind initto create a new site (after binding the MarkBind version to the one containing changes made in this PR) will create anindex.mdnow containingtitlein itsfrontmattertag, and asite.jsonthat no longer declares thetitle.Proposed commit message: (wrap lines at 72 characters)
Remove override of title property in the init site
Checklist: ☑️