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

No Effect in Github Pages Theme #7

Closed
dgjansen opened this issue Mar 22, 2018 · 3 comments
Closed

No Effect in Github Pages Theme #7

dgjansen opened this issue Mar 22, 2018 · 3 comments
Labels
question Support on how to use this project

Comments

@dgjansen
Copy link

I've followed the instructions at
https://allejo.io/blog/a-jekyll-toc-without-plugins-or-javascript/
and compared with
ministryofjustice/technical-guidance#7
so I've added the include in:
https://github.com/dgjansen/Lizenzcenter/Cases.md
and I've added the toc.html in
https://github.com/dgjansen/Lizenzcenter/tree/master/_includes
but it seems nothing happens at all.

I'm trying to use it here:
https://dgjansen.github.io/Lizenzcenter/Cases

But somehow it's not working. Nothing happens. Any ideas?

Could it be it's not compatible with the default github pages templates?

@allejo
Copy link
Owner

allejo commented Mar 22, 2018

This project should work anywhere, including GitHub's default themes. However, this project is designed to be used inside Jekyll layouts, not markdown documents. If you look at the UK's usage, you'll see that it's in _layout/default.html. In order for it to work with GitHub themes, you'll have to override the layouts provided by the theme and include toc.html in your overridden layout.

Since you're using the "Slate" theme, this is the file you'll have to copy paste into your repository and then you'd be able to use toc.html.

https://github.com/pages-themes/slate/blob/master/_layouts/default.html

@allejo allejo added the question Support on how to use this project label Mar 22, 2018
@dgjansen
Copy link
Author

Thanks a lot! I've got it to work.

@allejo
Copy link
Owner

allejo commented Mar 23, 2018

glad to hear! 👍

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

No branches or pull requests

2 participants