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 custom files is not working #100

Open
djhoese opened this issue May 19, 2023 · 0 comments
Open

Support for custom files is not working #100

djhoese opened this issue May 19, 2023 · 0 comments

Comments

@djhoese
Copy link

djhoese commented May 19, 2023

Describe the bug

I have a GitHub Pages project (https://github.com/pytroll/pytroll.github.io) which due to some limitations of GitHub Pages I was pulling in the minima theme from github instead of the one officially supported by github pages (at least this is what I remember about doing it). I also customized the theme by having a _layouts/default.html, an _includes/anchor_support.html, and a assets/css/style.scss to add anchor symbols to the left of sections (h2 tags) using the anchor-js library.

I noticed recently that the anchors were no longer appearing. After diving in a bit I noticed that the javascript wasn't even being loaded and that my custom changes were being ignored completely. What I discovered (or at least got to work) was that the minima theme's home.html and page.html template were pulling/including the theme's default.html and not my custom _layouts/default.html. After copying home and page to my own directory things seem to be working.

Steps to reproduce the behavior

  1. See Fix custom theme files not being included pytroll/pytroll.github.io#46 for more details.
  2. Download/clone https://github.com/pytroll/pytroll.github.io/tree/2186e32cbc704d6678c8c67db3b12c959333d992
  3. Build the site (bundle install, bundle exec jekyll serve)
  4. Open the site, view source, and notice that anchor.min.js is never included as specified in anchor_support.html.

Copying https://github.com/jekyll/minima/blob/master/_layouts/home.html and https://github.com/jekyll/minima/blob/master/_layouts/page.html to _layouts and things should work.

Expected behavior

Custom local theme files override remote theme files.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

If this is not expected to work then I'm sorry I missed it in the README.

@vinorodrigues vinorodrigues mentioned this issue Oct 8, 2024
Closed
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

No branches or pull requests

1 participant