Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Add support for Markdown rendering Homepage content #3

Closed
wants to merge 2 commits into from

Conversation

shank4804
Copy link

@shank4804 shank4804 commented Feb 17, 2019

This PR adds support to render the homepage contents from a markdown file called homepage.md if it is present. Currently, the only way the homepage contents are set from homeText parameter set in the config.toml file. With this new addition, whatever is written in the homepage.md gets rendered easily.

I found this by using the solution posted in the main Hugo repo: gohugoio/hugo#330 (comment)

@shank4804
Copy link
Author

shank4804 commented Feb 17, 2019

@zwbetz-gh Can you review this? I am currently using it this way in my website. Just wanted to push it up since someone else might run into the issues. :-)

@zwbetz-gh
Copy link
Owner

Hi there, thanks for the PR.

The Netlify build is currently failing with this error:

Error building site: failed to render pages: render of "home" failed: "/opt/build/repo/layouts/index.html:10:7": execute of template failed: template: index.html:10:7: executing "main" at : wrong number of args for isset: want 2 got 1

@zwbetz-gh
Copy link
Owner

@shank4804 I like this idea, and I've implemented it in 82aa487.

Checkout my changes to index.html, you may want to copy that syntax for your site, it is more terse :)

I'll go ahead and close this PR. Thanks again

@zwbetz-gh zwbetz-gh closed this Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants