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

Support For Collections #32

Open
mmenanno opened this issue Nov 24, 2023 · 2 comments · May be fixed by #33
Open

Support For Collections #32

mmenanno opened this issue Nov 24, 2023 · 2 comments · May be fixed by #33

Comments

@mmenanno
Copy link

Is your feature request related to a problem? Please describe the problem you're trying to solve.

Currently if you have pages in a collection, this gem does not apply the layout automatically

Describe the solution you'd like

Support for collections

Describe alternatives you've considered

Alternative is specifying the layout in the frontmatter

Additional context

I've put together an example of this using the just-the-docs template.
Repo: https://github.com/halorrr/collections-test
Site: https://halorrr.github.io/collections-test/

You can see when visiting the site everything looks as expected initially:
https://halorrr.github.io/collections-test/
image

If you click the Collection Test Layout page which has the layout specified in the frontmatter, it will also look normal:
image

But if you click the Collection Test No Layout page which does not have the layout specified in the frontmatter you will see not layout is applied:
image

This was a very basic test, setting up the collection the way that Just The Docs suggests:
https://just-the-docs.com/docs/configuration/#document-collections which you can see in the example config here:
https://github.com/halorrr/collections-test/blob/main/_config.yml

@mmenanno
Copy link
Author

Created a quick PR for this, still need to figure out how the testing in the fixture setup works so I can add tests, but it seems to work when I tested locally #33

@mmenanno
Copy link
Author

Tests on the PR to resolve this all seem to be working now, so it is ready when you have a chance to look @benbalter

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

Successfully merging a pull request may close this issue.

1 participant