Open chatziko opened 4 days ago
Always good idea to add more flexibility, I just wonder what is the use case? Do you have an example published already somewhere?
Are you aiming to produce separate pages of the same template? Or is it going to be somehow interlinked?
Here's an example:
It's a single site for a theater company. Each actor has lots of info in several sub-sections, so it makes sense to have their own scrolling subdirectory page (a single internal page would look too flat and packed). These subdirectories are still part of the company site, so there's a "back" link to the homepage.
Interesting. It's like multiple websites sharing the theme. Perhaps you are also touching the topic of redesigning the "detail" pages #116 , which is currently of trivial nature. I can imagine we abondon it completely in favor of your solution.
Just throwing in some ideas how this could be developed in the future:
Let me know what you think of the navigation.
There's a small conflict by the way :)
I fixed the conflict (trivial one introduced by #197).
I'm actually using all 3 types of pages:
I think having all three should cover most needs of small-to-medium websites. And of course someone could choose to use only a subset of them, eg not use detail pages and use internal scrolling pages instead.
We should use clear and consistent names for these btw.
I would propose the following plan to move forward:
exampleSite
. We don't need any more functionality to have a first working example.
This is a simple PR that does not change the theme's behaviour for existing users in any way (the example page renders exactly the same).
On the other hand, it adds the flexibility of reusing the scrolling
index.html
template in multiple pages (not just the homepage) in a very simple way:subdir
directory with asubdir/_index.md
file (i.e. a hugo section)layout: index
insubdir/_index.md
to instruct hugo to use the_default/index.html
template.subdir/homepage/<section>.md
as usualAn example can be found in this commit (not part of the PR).
The changes are straightforward:
./homepage
instead of/homepage
index.html
inside_default
so that it can be re-used..Parent
page in back links instead of the root page.I don't know if you'd like to have full support for multiple scrolling pages in the future, or you prefer to keep the theme simple. But in any case this PR is simple and only adds flexibility, so I hope it can be merged.