... but I haven't yet figured out how can I change main preshipped index.html page to something you have in demo as starting page https://mmistakes.github.io/minimal-mistakes/ ? And another question is how to make section similar to https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/ with interactive table of contents on the left. I would like to ask is it possible to share complete demo theme with these examples included, so I would able to figure it out?
Not a silly question at all. The entire demo site is under the gh-pages branch. For the starting page you'll find that under _pages/home.md. Just replace index.html with home.md and rename to index.md and then edit however you'd like.
The left nav stuff in the documentation collection is done by assigning sidebar YAML Front Matter. If you check any of the files in _docs you'll find stuff like this in the Front Matter:
sidebar:
nav: docs
Basically what that's doing is telling some Liquid I have in a layout to use the navigation links in a data file _data/navigation.yml under the docs key. There's also a nav_list helper I built to do most of the heavy lifting. It doesn't quite work in all circumstances so it might need to be customized to fit your need. That's part of the reason I haven't documented it yet since it was kind of a one off to build the docs section.
Hope this helps.
This is great, thanks for detailing it!
Another great feature to possibly add, would be having an automatically generated navigation depending upon a collection's directory layout.
I'm not very good with liquid, but I'm trying to see if this is doable by cycling through each page in a collection and then splitting the path at '/' to determine the path. Ideally, the navigation should mirror the directory structure, like the following:
_myCollection \
subFolderB \
pageB.md
subFolderB \
pageB.md
to be represented as:
I realise you've already done your bit by releasing such an awesome, feature-rich theme, but do you have any insight that could get me going?
Cheers!
@absolutejam Take a look at the breadcrumbs.html include. It's not exactly what you want but might help to get you started with the necessary Liquid to split the path how you need to do subfolders.
Ah yeah, I must have missed that feature. I'll try and adapt that and get back to you if it's of any use! Thanks again for your help and amazing contribution @mmistakes
Think I addressed all of the concerns so closing I'm closing this. Please reopen if that's not the case.
Most helpful comment
Not a silly question at all. The entire demo site is under the
gh-pagesbranch. For the starting page you'll find that under_pages/home.md. Just replaceindex.htmlwithhome.mdand rename toindex.mdand then edit however you'd like.The left nav stuff in the documentation collection is done by assigning sidebar YAML Front Matter. If you check any of the files in
_docsyou'll find stuff like this in the Front Matter:Basically what that's doing is telling some Liquid I have in a layout to use the navigation links in a data file
_data/navigation.ymlunder thedocskey. There's also anav_listhelper I built to do most of the heavy lifting. It doesn't quite work in all circumstances so it might need to be customized to fit your need. That's part of the reason I haven't documented it yet since it was kind of a one off to build the docs section.Hope this helps.