-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Theme inheritance #2639
Comments
That is taking it too far, me thinks. There are lots of theme related stuff that comes further up the ladder than this one (standards, widgets ...). |
Do you mean functionalities that are more important to develop first? (in which case I agree!) |
Yes, I meant to write "ladder". |
Okay! Anyway I think this is not too difficult a task to develop. |
On the Hugo discussion site, this thread is similar, to wit:
|
What Hugo should have is:
It does not need to be hard, but we should probably first address the somewhat clumsy theme addressing scheme (now people have to manually download themes and put them in a magic folder). |
See also this discussion here: https://discuss.gohugo.io/t/theme-standards-and-general-experience/6438 |
@bep, for the naming convention of a config file: Actually a lot of theme designers already use What would you tell about a |
https://github.com/sethmacleod/aerial/blob/master/theme.toml |
Snif… What would be suited best? If that filename is less used than |
@lebarde please don't start discussions on tiny implementation details when the full picture is so unclear. That is just a waste of everyone's time. I have said it before, but I can say it again: Before we even start to think about theme inheritance, we need to handle external resources in a much better way than it is today. And that is a task much bigger than a simple config file. |
@bep Thanks for clearing the situation! You are right about the fact that the picture is unclear. When I dived into the code I effectively saw that I would have to hook every access to a file to look for a parent. That would be made things most complicated.
And I may have misinterpreted your statement. Anyway, I did not know (or remember) that you said that. As you said it did not need to be hard, I started to try. I recognize that external resources have to be handled another way before starting that, so I will not go further on that case! |
The inheritance part of this is easier than you think, but again, this must come after some other thing. |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I would appreciate so much that Hugo had theme inheritance abilities. This is what we can do on eg. wordpress and this functionality is extraordinary: this way, you can make your own theme based on an existing one, while still getting updates from the base theme. If you don't do so and want to get the updates, you have to merge some git branches (for instance), and that contributes to keep non-developers away from using hugo.
What I suggest is like Wordpress: in the child theme, setting which is the base theme (that can be done inside the theme's config file like
parent = "hugo-material-docs"
), and always preferring a new file when available.Note: to my mind this functionality does not seem to exist inside any other static site generator for now, but I assume this is a must-have in a widely used static site generator!
What do you think of it?
The text was updated successfully, but these errors were encountered: