Closed MH15 closed 4 years ago
I have the same issue. I don't think github pages supports the menus plugin and they are not clear on what plugins they support.
You can add the menu yml to your _config.yml which renders the plugin useless. I just got the plugin bc Forestry has a UI for it.
Indeed ya'll are right, Github Pages doesn't support Jekyll-Menus. You will need to build it on your computer (there is a Docker image available https://github.com/envygeeks/jekyll-docker) and then push to your gh-pages branch.
Yeah, I've seen that link around when people ask about supported plugins, but it's about as useful as a screen door on a submarine.
That list is everything that Github pages installs in their Docker image.
neat, that doesnt help me know which plugins it supports. I just keep a personal list of plugins that won't work on gh-pages. Adding jekyll-menus to the list.
Keep it civil, I am not required to help you. And that is literally a list of what plugins, and themes are supported on Github Pages, and their current versions.
I figured out a better way to use your menus on gh-pages, you can keep your menus in the data folder since jekyll has a native functionality for data files. You'll need to remove the plugin for this to work
_data/menus.yml
sidebar:
- url: /example
title: Example
**index.html***
{% for menu-item in site.data.menus.sidebar %}
<ul>
<li>{{ menu-item.title}}</li>
</ul>
{% endfor %}
Sorry the solution is delete the plugin :/. Inshallah one day github will support it.
Sorry the solution is delete the plugin
@ecupaio I removed all references to jekyll-menus but am still having the same problem. Is there some trick to make it work?
Oops, I got it. You said this but I didn't read clearly.
{% for link in site.menus.header %}
to
{% for link in site.data.menus.header %}
Note that this breaks any children
menus without a little manual work.
gotcha. you could do a loop within the loop to get at the child menus, which I'm assuming you did. you can send me a DM if you need any jekyll help
GitHub Pages only allow a whitelist of plugins: https://pages.github.com/versions/
It's possible though to get this plugin run on GitHub Pages, by using GitHub Actions: https://jekyllrb.com/docs/continuous-integration/github-actions/
I have my menus defined in a menus.yml file and I'm using the demo code to display them but the for lop doesn't find any items. What am I doing wrong?
https://github.com/MH15/xc/tree/gh-pages