-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add Homepage front matter #109
Merged
yashmehrotra
merged 13 commits into
gokarna-theme:main
from
jamesericdavidson:homepage-front-matter
Aug 9, 2022
Merged
Add Homepage front matter #109
yashmehrotra
merged 13 commits into
gokarna-theme:main
from
jamesericdavidson:homepage-front-matter
Aug 9, 2022
Conversation
This file contains 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
A new parameter enableFrontMatter can be set to true to display the contents of content/_index.md The home-content section inherits the CSS properties of home-about See the documentation: https://gohugobrasil.netlify.app/templates/homepage/#add-content-and-front-matter-to-the-homepage
✅ Deploy Preview for gokarna-hugo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@jamesericdavidson Hi, sorry I was making some changes in the PR and deleted the config.toml by mistake. Can you re-add it. Also, have suggested some changes in the comments. Please have a look. |
yashmehrotra
reviewed
Aug 4, 2022
yashmehrotra
reviewed
Aug 4, 2022
yashmehrotra
reviewed
Aug 4, 2022
Thanks for the review 🙂
I will address your comments later
Regards,
James Davidson
…-------- Original Message --------
On 4 Aug 2022, 12:38, Yash Mehrotra wrote:
@yashmehrotra commented on this pull request.
---------------------------------------------------------------
In [layouts/index.html](#109 (comment)):
> @@ -25,6 +25,14 @@ <h3>{{ .Site.Params.Description }}</h3>
</section>
{{ end }}
+{{ if isset .Site.Params "enablefrontmatter" }}
+ {{ if eq .Site.Params.EnableFrontMatter "true" }}
+ <section class="home-content">
And an <hr> tag before section
—
Reply to this email directly, [view it on GitHub](#109 (review)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/A2GRSNXVFUMLOSV4G6IODYLVXOTTFANCNFSM55MXM65A).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Apologies for the delay - internet foibles 😃 |
This reverts commit c3d73a6.
Thanks for the PR @jamesericdavidson |
Thanks for merging 🤝 |
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.
Use the native
content/_index.md
file and{{ .Content }}
variable to display front matter.An example of the feature has been added to
exampleSite/content/_index.md
in 73476bf - discard this commit if you don't want to use it.Set the
enableFrontMatter
parameter inconfig.toml
to"true"
to enable the feature<section>
will not be createdDocumentation for the
enableFrontMatter
parameter is available inexampleSite/content/posts/theme-documentation-basics/
Hope this is useful. Appreciate any feedback or improvements, as I'm inexperienced with Hugo, and by no means a design buff. I delegate the HTML and CSS prettiness to you, which is why I use this theme to begin with 😉
For reference, the upstream Hugo documentation is available here: https://gohugobrasil.netlify.app/templates/homepage/#add-content-and-front-matter-to-the-homepage