-
-
Notifications
You must be signed in to change notification settings - Fork 198
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 content template #48
Conversation
The patch seems reasonable and I don't expect any migration issues. Nevertheless I must admit, although I am a programmer in real life, I am a go and Hugo noob. Some syntax still puzzles me and I have only hit the tip of Hugo's feature iceberg. |
Will the template for content also make it easier for applying content changes on a mass/site level ? I'm in the middle of making changes to suit the site content, and wonder if I have to redo some changes in the event of a complete re-installation of the theme ? At present the content changes are simply copied from a backup. |
That depends on the kind of changes you want to apply. But in my general fealing I'ld say "Yes".
Without knowing you site's code it's hard to say. In the best case you have to only move some code around from one file to the overriden content template. |
@McShelby - Thanks for your help |
In reference to having content as a template, I was wanting to remove "Edit this page" and it seems there are 2 options ??
OR both ? Will the template function make this easier ? Btw, I may have missed the documentation on the "how to" remove the "Edit this page" ? |
Template documenation is sub par and definately needs to be improved. PRs welcome ;-) And for your issue:
|
Thanks, that work fine. :) |
I think making content a template would be useful for people who want to do some automatic processing across the whole site. An example of that can be to enable people to add support for wiki-style links (as described here: matcornic/hugo-theme-learn#469) on their own, even if Hugo or the theme don't support it natively.
People can just add something like this to their own site under
layouts/partials/content.html
:Another use case I have is that I'd like to automatically "linkify" JIRA tickets with a given pattern XYZ-1234.