Remove empty title tags in generated tests#2186
Merged
tlylt merged 14 commits intoMarkBind:masterfrom Mar 15, 2023
Merged
Conversation
Contributor
yucheng11122017
left a comment
There was a problem hiding this comment.
Hi @lhw-1, thank you for the work on this!
I agree with the point that you raised that maybe using the title of the file would be a better way to generate the default title. Default is urm.. not the best 😂
title tagstitle tags in generated tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
Overview of changes:
Resolves #2166.
As pointed out in the issue thread, instead of removing thetitletag altogether when empty, it would be a better practice to simply declare a default title for sites, e.g. "Default", as is currently being done for thelayoutproperty (with the default value declared here). This PR consists of a straightforward fix by implementing a default value for thetitletag.As per the discussion in the original issue, after comparing approaches taken by other static site generators, we decided to stick with the default behavior, and additionally address the original concern of removing any unnecessary empty
titletags generated (as well as prevent any emptytitletags from being generated in the future).Anything you'd like to highlight/discuss:
The default value is currently set to "Default", but suggestions on a better title are needed.(Setting thetitleas the name of the.mdfile could be a better idea)Once the fix has been finalized, documentation (primarily the user guide) will be updated as well.Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Remove empty
titletags in generated testsChecklist: ☑️