minimal-mistakes: Documentation not correct for jekyll-archives
- This is a question about using the theme.
- I have updated all gems with
bundle update. - I have tested locally with
bundle exec jekyll build.
Environment informations
- Minimal Mistakes version:
github-pagesorjekyllgem version: github-pages 118- Operating system: Windows 10
Expected behavior
/tags/ and /categories/ working
Steps to reproduce the behavior
Just forked and followed the instructions. But I couldn’t get the instructions to work to generate tags and categories links.
I think the mistake is that the Gemfile is missing the reference to jekyll-archives and that the instructions do not mention that in the _config.yml has the `jekyll-archives section needs to uncommented.
# Archives
# Type
# - GitHub Pages compatible archive pages built with Liquid ~> type: liquid (default)
# - Jekyll Archives plugin archive pages ~> type: jekyll-archives
# Path (examples)
# - Archive page should exist at path when using Liquid method or you can
# expect broken links (especially with breadcrumbs enabled)
# - <base_path>/tags/my-awesome-tag/index.html ~> path: /tags/
# - <base_path/categories/my-awesome-category/index.html ~> path: /categories/
# - <base_path/my-awesome-category/index.html ~> path: /
category_archive:
type: liquid
path: /categories/
tag_archive:
type: liquid
path: /tags/
# https://github.com/jekyll/jekyll-archives
# jekyll-archives:
# enabled:
# - categories
# - tags
# layouts:
# category: archive-taxonomy
# tag: archive-taxonomy
# permalinks:
# category: /categories/:name/
# tag: /tags/:name/
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (17 by maintainers)
Commits related to this issue
- Clarify that jekyll-archives has to be installed And show the simplest way to do it per https://github.com/mmistakes/minimal-mistakes/issues/811#issuecomment-277461052. — committed to ohadschn/minimal-mistakes by ohadschn 7 years ago
- Clarify that jekyll-archives has to be installed (#1206) Clarify that jekyll-archives has to be installed Show the simplest way to do it per https://github.com/mmistakes/minimal-mistakes/issues/81... — committed to mmistakes/minimal-mistakes by ohadschn 7 years ago
- Clarify taxonomy page and index generation Per https://github.com/mmistakes/minimal-mistakes/issues/811#issuecomment-325769757 — committed to ohadschn/minimal-mistakes by ohadschn 7 years ago
- Clarify taxonomy page and index generation (#1207) Clarify taxonomy page and index generation per https://github.com/mmistakes/minimal-mistakes/issues/811#issuecomment-325769757 — committed to mmistakes/minimal-mistakes by ohadschn 7 years ago
- Clarify that jekyll-archives has to be installed (#1206) Clarify that jekyll-archives has to be installed Show the simplest way to do it per https://github.com/mmistakes/minimal-mistakes/issues/81... — committed to jpogorzelski/jpogorzelski.github.io.old by ohadschn 7 years ago
- Clarify taxonomy page and index generation (#1207) Clarify taxonomy page and index generation per https://github.com/mmistakes/minimal-mistakes/issues/811#issuecomment-325769757 — committed to jpogorzelski/jpogorzelski.github.io.old by ohadschn 7 years ago
- Clarify that jekyll-archives has to be installed (#1206) Clarify that jekyll-archives has to be installed Show the simplest way to do it per https://github.com/mmistakes/minimal-mistakes/issues/81... — committed to kkunapuli/kkunapuli.github.io by ohadschn 7 years ago
- Clarify taxonomy page and index generation (#1207) Clarify taxonomy page and index generation per https://github.com/mmistakes/minimal-mistakes/issues/811#issuecomment-325769757 — committed to kkunapuli/kkunapuli.github.io by ohadschn 7 years ago
- parent f53d9a2964860ccc43528c082312a7e7386e3be1 author Michael Rose <est.michael@gmail.com> 1393533295 -0500 committer seungwubaek <whiteseungwu@gmail.com> 1604582257 +0900 parent f53d9a2964860ccc435... — committed to seungwubaek/seungwubaek.github.io by mmistakes 10 years ago
- Clarify that jekyll-archives has to be installed (#1206) Clarify that jekyll-archives has to be installed Show the simplest way to do it per https://github.com/mmistakes/minimal-mistakes/issues/81... — committed to npflueger/npflueger.github.io by ohadschn 7 years ago
- Clarify taxonomy page and index generation (#1207) Clarify taxonomy page and index generation per https://github.com/mmistakes/minimal-mistakes/issues/811#issuecomment-325769757 — committed to npflueger/npflueger.github.io by ohadschn 7 years ago
- Clarify that jekyll-archives has to be installed (#1206) Clarify that jekyll-archives has to be installed Show the simplest way to do it per https://github.com/mmistakes/minimal-mistakes/issues/81... — committed to makaroniame/makaroniame-old.github.io by makaroniame 7 years ago
- Clarify taxonomy page and index generation (#1207) Clarify taxonomy page and index generation per https://github.com/mmistakes/minimal-mistakes/issues/811#issuecomment-325769757 — committed to makaroniame/makaroniame-old.github.io by makaroniame 7 years ago
The theme docs mention you need the Jekyll Archives plugin, which has a link to their instructions on how to install it. I just assumed anyone who wanted to go that route would read-up on the plugin and how to install/setup.
It’s not installed by default because it doesn’t work with GitHub Pages. To install
gem install jekyll-archivesor add it under the plugins group in yourGemfileThen run
bundle install.Happy to accept pull requests to make the theme docs more clear.
@kblife Your
jekyll-archivesconfig is way off that’s why it’s not working. Topics isn’t an array it knows anything about, nor Jekyll for that matter. It only works fortagsandcategories.Your best bet is to use
categoriesas topics (which I think you’re trying to do), but to do that you need to configure it that way properly. Then use the permalink paths as you have so instead of “category” in the URL it’ll have “answers/topics”You’re are setting a Jekyll Archives
layoutthat the theme doesn’t have, unless you’ve built that yourself. You’ll want to repurpose thearchive-taxonomylike so.If this doesn’t work I’d suggest reading up on how the Jekyll Archives plugin works and reaching out for help with them. It appears to me you’re having issues with that more than the theme. Which I don’t support.
Ahhh, now I understand:
_pages/category-archive.htmland_pages/tag-archive.htmlas described above, regardless of whether I usejekyll-archivesor not.jekyll-archives, taxonomy items get their own proper page automatically generated pointed to by “real” (non-hash) links, e.g.: https://mysite.com/categories/foo (which is independent of the full taxonomy index).You don’t. jekyll-archives only generates archives for specific taxonomies (or dates if configured). It doesn’t create an index page that lists all posts grouped by category or tag, which is what those links above do.
For example if you have a post with
categories: foo, bar. Depending on your permalink structure you’ll get something like/categories/foo/index.htmland/categories/bar/index.html. What you won’t get is/categories/index.html…Make sense?
@ohadschn Yeah you can. You have to manually add a “posts by category” page. Same for tags. The source for both are in the
/docs/_pagesfolder (as mentioned a few comments above).You can certainly do it that way. For the theme I approached it with a slightly DRYer approach (Don’t Repeat Yourself). Instead of creating layouts for the category page and another one for tags they both use the same
_layouts/archive.html. Less files to maintain that way.Then each page (categories/tags) use the
group-by-arrayhelper to construct the appropriateforloops. Both of these pages are provided as samples to get you started and are mentioned in the documentation. I could probably call them out more since they’re often missed./categories/#category)/tags/#tag)