Skip to content
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

Cannot set banner or bannerinline globally. #3

Open
flowchartsman opened this issue Oct 22, 2014 · 3 comments
Open

Cannot set banner or bannerinline globally. #3

flowchartsman opened this issue Oct 22, 2014 · 3 comments

Comments

@flowchartsman
Copy link

For the life of me, I cannot figure this out. If I add either of these parameters to an individual page, everything is fine. If I try to add them to the params section of the config or to archetypes/default.md, nothing works. The docs seem to indicate that the archetypes would be the place to put it, but no luck.

@tmaiaroto
Copy link
Owner

Did you add it to the archetypes after having a page created? Any new pages with the hugo new command will pick up values from the archetype (given you're making a new page under that archetype) but the template system won't go backwards and look for missing values if not present in your page.

Kind of annoying...But all settings must exist in each page's front-matter. Though I've tried to ensure these params aren't required and are optional. If it's getting caught up somewhere, let me know.

You should be able to set the banner in an archetype and then create new pages which should copy that value over.

I've also seen an interesting bug maybe? Maybe my imagination? Just me? I don't know, but if you don't have a new line after your archetype's front-matter, things may not work.

So for example:

+++
param = "value"
param2 = "value"
+++

Keep an extra line after +++

@flowchartsman
Copy link
Author

That seems to have been the problem, yeah. It was a page created before I modified the archetype. Would be nice to be able to set it in config.toml, though. Then all pages would display it by default unless overridden.

@tmaiaroto
Copy link
Owner

Yes, I can add that as well. My original intent with it was to allow an article header image (think like Medium) on a per story basis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants