| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is the website source that is used for the code.makery.ch. It uses the fantastic mixture.io as its underlying technology. Mixture greatly simplifies my life!
This readme describes the set up of the mixture project and the relevant settings for this project. For a complete description of what you can do with mixture read the mixture docs.
Most other settings in mixture.json are left on their defaults.
The file .githubsettings contains information about the GitHub username, password (GitHub Token automatically encrypted, encryption is unique to the application and account), repoUrl, branch, etc.
The theme folder contains all sass, css, fonts, and javascript that make up the stylinig of the page.
The sass folder contains a the main styling file called style.scss. This file imports all other files: the custom-variable, fonts, and bootstrap. The sass files are automatically preprocessed and minified and copied into the css folder.
The css folder contains some additional css files for the code styling with prettify.
The templates folder contains all liquid templates for individual pages.
Every page inherits a layout file from the templates/layouts subdirectory. Those are the currently used layouts:
Includes are small templates that are included inside layout files. Some of the includes must likely be customized:
There is an in-built global mixture model, accessible via the mixture namespace.
We're also using a custom global model called global inside the models folder. This model contains the website title, intro, google anayltics id, domain, email, and more.
It's important to define all the tags that are used. This list of tags is used by the archive.liquid template to display all possible tags.
Collections is the place where articles and blog posts are written. Every subdirectory corresponds to a collection. The blog collection is reserved for blog posts. All other collections are used for articles.
At the beginning of each (markdown) blog post we must define meta information about the post in a YAML format:
--- layout: post title: My Example Post date: 2014-05-03 00:00 slug: my-example-post description: "This is the place where we can put a description in one or two sentences." image: /assets/blog/14-05-03-my-example-post/some-image.png published: true prettify: true comments: false tags: - Something1 - Something2 css: - /assets/blog/14-05-03-my-example-post/some-custom-css.css javascript: - /assets/blog/14-05-03-my-example-post/some-custom-js.js - /assets/blog/14-05-03-my-example-post/more-custom-js.js ---
It's a good practice to use a filename combined with date and slug. The example above would have the filename 14-05-03-my-example-post.md.
I like to put all assets belonging to a blog post inside one separate folder. The assets for the blog post 14-05-03-my-example-post.md would thus be under /assets/blog/14-05-03-my-example-post/.
Articles are very similar to blog posts but contain some additional elements, mainly sidebars and updated.
---
layout: article
title: "My Example Article"
date: 2014-04-19 00:00
updated: 2014-05-07 00:00
slug: my-example-article1
canonical: /mycollection/article-original/
description: "This is the place where we can put a description in one or two sentences."
github: https://github.com/marcojakob/code.makery.ch/blob/master/collections/mycollection/my-example-article1.md
image: /assets/mycollection/my-example-article1/some-image.png
published: true
prettify: true
comments: false
sidebars:
- header: "Articles in this Series"
body:
- text: "Introduction"
link: /mycollection/my-example-article-intro/
paging: Intro
- text: "Part 1: Lorem"
link: /mycollection/my-example-article1/
paging: 1
active: true
- text: "Additional Infos Part 1"
link: /mycollection/my-example-article1-infos/
icon-css: fa fa-fw fa-info
- text: "Part 2: Ipsum"
link: /mycollection/my-example-article2/
paging: 2
- text: "Part 3: Dolor"
link: /mycollection/my-example-article3/
paging: 3
- text: "Part 4: Sit"
link: /mycollection/my-example-article4/
paging: 4
- header: "Download Sources"
body:
- text: Source of Examples
link: /assets/mycollection/my-example-article/some-sources.zip
icon-css: fa fa-fw fa-download
languages:
header: Languages
collection: mycollection
item: my-example-article1
part: part1
active: en
css:
- /assets/blog/14-05-03-my-example-post-1/some-custom-css.css
javascript:
- /assets/blog/14-05-03-my-example-post-1/some-custom-js.js
- /assets/blog/14-05-03-my-example-post-1/more-custom-js.js
---
For a description of most items see blog post description above. Here are the items that are special to the article layout:
I use the desired url slug as filename. If we don't provide a slug yaml element, mixture just uses the filename as url. This is ok here as I don't put the date inside the filename.
For the example above, the asset directory would be /assets/mycollection/my-example-article1/
This template is released under the MIT License (see LICENSE file). If you use the template, I would love to hear about how you're using it and it'd be great if you could include some form of attribution.
| Back | FazBrowse Home | New Git URL |