Switch from Minimal Mistakes on Jekyll
If you like the Minimal Mistakes theme, but want to use it with 11ty. This is your chance.
There a couple of things you need to do to get everything working.
Steps
These are the steps I identified so far, but they may not be enough. Upgrades are on your own risk.
- Make a new branch in your repository, e.g.
11ty. - Add dependencies for you
package.json. Checkout the originalpackage.jsonfor what to add. - Rename
_layoutsand_includesto_layouts_oldand_includes_oldso you do not overwrite any changes you have made. - Add files to ignore to
.eleventyignore. You can see them in your current Jekyll_config.ymlunder theignore-tag and the current file in the repository. - Move
_config.ymlto_data/site.ymlto preserve your current settings. - Copy
eleventy.config.mjsand the content from_configto your repository. - In
eleventy.config.mjscreate collections of all your collections, e.g._postsetc. See an example in the current file. - Add data files for the directories for your defaults. E.g.
_posts/_posts.jsonand similar files to all of your collections to provide frontmatter defaults. You can see your current setup under defaults in your old Jekyll_config.yml. - All
linkandpost_urlyou used in your current site, has to be rewritten to{% link collections.posts, "_filename.md" %}. You need to create a collection with the possible filenames, and you need to “” around the_filename.md. You might be able to just use collections.all, but that is untested. - Do search and replace on
site.postsand other collections and replace it withcollections.postsand do the same for other collections, you might have. - If you use
id=""withgalleryorfeature_row, then you need to rewrite the frontmatter tofeature_rowsandgalleriesand put the specific id in the frontematter under that tag. - Do a search and replace on
page.and replace it with nothing""; - Rewrite
css/main.scss. This is also where you have to set your theme directly if you want to change it.
Remove the dashes in the top of the file. If you added content below these lines, keep it. Add ../../_sass/ before minimal-mistakes.
Like this:
@import "../../_sass/minimal-mistakes/skins/default"; // skin
@import "../../_sass/minimal-mistakes"; // main partials
- Go through the
eleventy.config.mjs-file. In the bottom changeinput,includes,layoutsto the proper directories compared to your setup. - Make sure to copy the
assets/jsdirectory. - Search for
| where:and you need to change the where to| where: "data.tags", "my-tag". Do the same forsortand other filters used on the page-data. - Check your markdown tables with liquid code, as whitespace is handled a little bit different in liquidjs.
There might be more things you need to do. Follow error messages in the the prompt after doing npm run watch:eleventy.