jekyll-theme-mnc 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CODE_OF_CONDUCT.md +133 -0
- data/LICENSE.txt +21 -0
- data/README.md +330 -0
- data/_includes/analytics.html +0 -0
- data/_includes/custom-head.html +2 -0
- data/_includes/feed-subscription.html +1 -0
- data/_includes/footer.html +8 -0
- data/_includes/head.html +15 -0
- data/_includes/header-list.html +30 -0
- data/_includes/header.html +29 -0
- data/_includes/post-list-item.html +11 -0
- data/_includes/search-duckduckgo.html +13 -0
- data/_includes/social.html +62 -0
- data/_includes/tumblelog-feed-subscription.html +1 -0
- data/_layouts/category.html +18 -0
- data/_layouts/default.html +11 -0
- data/_layouts/error.html +28 -0
- data/_layouts/home.html +32 -0
- data/_layouts/page.html +17 -0
- data/_layouts/post.html +42 -0
- data/_layouts/redirect.html +31 -0
- data/_layouts/tumblelog.html +39 -0
- data/_sass/jekyll-theme-mnc/_base.scss +245 -0
- data/_sass/jekyll-theme-mnc/_layout.scss +341 -0
- data/_sass/jekyll-theme-mnc/custom-styles.scss +2 -0
- data/_sass/jekyll-theme-mnc/custom-variables.scss +1 -0
- data/_sass/jekyll-theme-mnc/initialize.scss +52 -0
- data/_sass/jekyll-theme-mnc/skins/auto.scss +363 -0
- data/_sass/jekyll-theme-mnc/skins/classic.scss +5 -0
- data/_sass/jekyll-theme-mnc/skins/dark.scss +5 -0
- data/_sass/jekyll-theme-mnc/skins/solarized-dark.scss +5 -0
- data/_sass/jekyll-theme-mnc/skins/solarized-light.scss +5 -0
- data/_sass/jekyll-theme-mnc/skins/solarized.scss +201 -0
- data/assets/css/style.scss +7 -0
- data/assets/jekyll-theme-mnc-social-icons.svg +41 -0
- metadata +155 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8bfc523055587e305611e81909353db07a6787d32584e9a673700d86b45f0eca
|
4
|
+
data.tar.gz: 8768097ddef4573ae1540ab73c49b38fa591d4bfb4597f5206ab02606e454d03
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a5d528e368e6826f387442c7c704465a1069b19b02e83b379c8fda12a047f929b99a51a15859de655ca244002f2b5fc00895423dcd97c998af160530834250a6
|
7
|
+
data.tar.gz: 74cc57e67d5bb73b92b7fb9c719617a7e7981c57e180bb8379b0ee00bb9edf25480e1d316a76a48e5836f45385aaa969837576b9c381adbe8f860e1ea7a10159
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
|
2
|
+
# Contributor Covenant Code of Conduct
|
3
|
+
|
4
|
+
## Our Pledge
|
5
|
+
|
6
|
+
We as members, contributors, and leaders pledge to make participation in our
|
7
|
+
community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
9
|
+
identity and expression, level of experience, education, socio-economic status,
|
10
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
11
|
+
identity and orientation.
|
12
|
+
|
13
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
14
|
+
diverse, inclusive, and healthy community.
|
15
|
+
|
16
|
+
## Our Standards
|
17
|
+
|
18
|
+
Examples of behavior that contributes to a positive environment for our
|
19
|
+
community include:
|
20
|
+
|
21
|
+
* Demonstrating empathy and kindness toward other people
|
22
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
23
|
+
* Giving and gracefully accepting constructive feedback
|
24
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
25
|
+
and learning from the experience
|
26
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
27
|
+
community
|
28
|
+
|
29
|
+
Examples of unacceptable behavior include:
|
30
|
+
|
31
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
32
|
+
any kind
|
33
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
34
|
+
* Public or private harassment
|
35
|
+
* Publishing others' private information, such as a physical or email address,
|
36
|
+
without their explicit permission
|
37
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
38
|
+
professional setting
|
39
|
+
|
40
|
+
## Enforcement Responsibilities
|
41
|
+
|
42
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
43
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
44
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
45
|
+
or harmful.
|
46
|
+
|
47
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
48
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
49
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
50
|
+
decisions when appropriate.
|
51
|
+
|
52
|
+
## Scope
|
53
|
+
|
54
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
55
|
+
an individual is officially representing the community in public spaces.
|
56
|
+
Examples of representing our community include using an official email address,
|
57
|
+
posting via an official social media account, or acting as an appointed
|
58
|
+
representative at an online or offline event.
|
59
|
+
|
60
|
+
## Enforcement
|
61
|
+
|
62
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
63
|
+
reported to the community leaders responsible for enforcement at
|
64
|
+
[INSERT CONTACT METHOD].
|
65
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
66
|
+
|
67
|
+
All community leaders are obligated to respect the privacy and security of the
|
68
|
+
reporter of any incident.
|
69
|
+
|
70
|
+
## Enforcement Guidelines
|
71
|
+
|
72
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
73
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
74
|
+
|
75
|
+
### 1. Correction
|
76
|
+
|
77
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
78
|
+
unprofessional or unwelcome in the community.
|
79
|
+
|
80
|
+
**Consequence**: A private, written warning from community leaders, providing
|
81
|
+
clarity around the nature of the violation and an explanation of why the
|
82
|
+
behavior was inappropriate. A public apology may be requested.
|
83
|
+
|
84
|
+
### 2. Warning
|
85
|
+
|
86
|
+
**Community Impact**: A violation through a single incident or series of
|
87
|
+
actions.
|
88
|
+
|
89
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
90
|
+
interaction with the people involved, including unsolicited interaction with
|
91
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
92
|
+
includes avoiding interactions in community spaces as well as external channels
|
93
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
94
|
+
ban.
|
95
|
+
|
96
|
+
### 3. Temporary Ban
|
97
|
+
|
98
|
+
**Community Impact**: A serious violation of community standards, including
|
99
|
+
sustained inappropriate behavior.
|
100
|
+
|
101
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
102
|
+
communication with the community for a specified period of time. No public or
|
103
|
+
private interaction with the people involved, including unsolicited interaction
|
104
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
105
|
+
Violating these terms may lead to a permanent ban.
|
106
|
+
|
107
|
+
### 4. Permanent Ban
|
108
|
+
|
109
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
110
|
+
standards, including sustained inappropriate behavior, harassment of an
|
111
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
112
|
+
|
113
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
114
|
+
community.
|
115
|
+
|
116
|
+
## Attribution
|
117
|
+
|
118
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
119
|
+
version 2.1, available at
|
120
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
121
|
+
|
122
|
+
Community Impact Guidelines were inspired by
|
123
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
124
|
+
|
125
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
126
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
127
|
+
[https://www.contributor-covenant.org/translations][translations].
|
128
|
+
|
129
|
+
[homepage]: https://www.contributor-covenant.org
|
130
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
131
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
132
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
133
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022-present Michael Nordmeyer and contributors
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,330 @@
|
|
1
|
+
# Jekyll Theme MNC
|
2
|
+
|
3
|
+
*MNC is a one-size-fits-all Jekyll theme for writers, and is based on [minima](https://github.com/jekyll/minima), but uses a classless approach and adds an optional tumblelog*.
|
4
|
+
|
5
|
+
**Disclaimer:** The information here may vary depending on the version you're using. Please refer to the `README.md` bundled within the theme-gem for information specific to your version or by pointing your browser to the Git tag corresponding to your version. e.g. `https://github.com/michaelnordmeyer/jekyll-theme-mnc/blob/v1.0.0/README.md`. Running `bundle show jekyll-theme-mnc` will provide you with the local path to your current theme version.
|
6
|
+
|
7
|
+
[Theme demo](https://jekyll-theme-mnc.michaelnordmeyer.com)
|
8
|
+
|
9
|
+

|
10
|
+
|
11
|
+
**Note:** Paging is not supported, which means all posts are displayed on the home page.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Add this line to your Jekyll site's Gemfile:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem "jekyll-theme-mnc"
|
19
|
+
```
|
20
|
+
|
21
|
+
Then execute `bundle` in your terminal.
|
22
|
+
|
23
|
+
## Contents At-A-Glance
|
24
|
+
|
25
|
+
### Layouts
|
26
|
+
|
27
|
+
Refers to files within the `_layouts` directory, that define the markup for your theme.
|
28
|
+
|
29
|
+
- `default.html` – The base layout that lays the foundation for subsequent layouts. The derived layouts inject their contents into this file at the line that says ` {{ content }} ` and are linked to this file via [FrontMatter](https://jekyllrb.com/docs/frontmatter/) declaration `layout: default`.
|
30
|
+
- `home.html` – The layout for your landing-page / home-page / index-page. [[More Info.](#home-layout)]
|
31
|
+
- `page.html` – The layout for your documents that contain FrontMatter, but are not posts.
|
32
|
+
- `post.html` – The layout for your posts.
|
33
|
+
|
34
|
+
#### Home Layout
|
35
|
+
|
36
|
+
`home.html` is a flexible HTML layout for the site's landing-page / home-page / index-page.
|
37
|
+
|
38
|
+
##### Main Heading and Content Injection
|
39
|
+
|
40
|
+
The *home* layout will inject all content from your `index.md` / `index.html` *before* the `Posts` heading. This will allow you to include non-posts related content to be published on the landing page under a dedicated heading. *We recommended that you title this section with a Heading2 (`##`)*.
|
41
|
+
|
42
|
+
Usually the `site.title` itself would suffice as the implicit 'main-title' for a landing-page. But, if your landing-page would like a heading to be explicitly displayed, then simply define a `title` variable in the document's front matter and it will be rendered with an `<h1>` tag.
|
43
|
+
|
44
|
+
##### Post Listing
|
45
|
+
|
46
|
+
It will be automatically included only when your site contains one or more valid posts or drafts (if the site is configured to `show_drafts`).
|
47
|
+
|
48
|
+
The title for this section is `Posts` by default and rendered with an `<h3>` tag. You can customize this heading by redefining the `list_title` variable in the document's front matter.
|
49
|
+
|
50
|
+
### Includes
|
51
|
+
|
52
|
+
Refers to snippets of code within the `_includes` directory that can be inserted in multiple layouts (and another include-file as well) within the same theme-gem.
|
53
|
+
|
54
|
+
- `analytics.html` – Inserts analytics module (active only in production environment).
|
55
|
+
- `custom-head.html` – Placeholder to allow users to add more metadata to `<head />`.
|
56
|
+
- `footer.html` – Defines the site's footer section.
|
57
|
+
- `head.html` – Code-block that defines the `<head></head>` in *default* layout.
|
58
|
+
- `header.html` – Defines the site's main header section. By default, pages with a defined `title` attribute will have links displayed here.
|
59
|
+
- `search-duckduckgo.html` – Renders DuckDuckGo custom search.
|
60
|
+
- `social.html` – Renders social-media icons based on the `jekyll-theme-mnc.social_links` data in the config file.
|
61
|
+
|
62
|
+
### Sass
|
63
|
+
|
64
|
+
Refers to `.scss` files within the `_sass` directory that define the theme's styles.
|
65
|
+
|
66
|
+
- `jekyll-theme-mnc/skins/classic.scss` – The "classic" skin of the theme. *Used by default.*
|
67
|
+
- `jekyll-theme-mnc/initialize.scss` – A component that defines the theme's *skin-agnostic* variable defaults and sass partials.
|
68
|
+
It imports the following components (in the following order):
|
69
|
+
- `jekyll-theme-mnc/custom-variables.scss` – A hook that allows overriding variable defaults and mixins. (*Note: Cannot override styles*)
|
70
|
+
- `jekyll-theme-mnc/_base.scss` – Sass partial for resets and defines base styles for various HTML elements.
|
71
|
+
- `jekyll-theme-mnc/_layout.scss` – Sass partial that defines the visual style for various layouts.
|
72
|
+
- `jekyll-theme-mnc/custom-styles.scss` – A hook that allows overriding styles defined above. (*Note: Cannot override variables*)
|
73
|
+
|
74
|
+
Refer the [skins](#skins) section for more details.
|
75
|
+
|
76
|
+
### Assets
|
77
|
+
|
78
|
+
Refers to various asset files within the `assets` directory.
|
79
|
+
|
80
|
+
- `assets/css/style.scss` – Imports sass files from within the `_sass` directory and gets processed into the theme's
|
81
|
+
stylesheet: `assets/css/styles.css`.
|
82
|
+
- `assets/jekyll-theme-jekyll-theme-mnc-social-icons.svg` – A composite SVG file comprised of *symbols* related to various social-media icons.
|
83
|
+
This file is used as-is without any processing. Refer [section on social networks](#social-networks) for its usage.
|
84
|
+
|
85
|
+
### Plugins
|
86
|
+
|
87
|
+
MNC comes with [`jekyll-seo-tag`](https://github.com/jekyll/jekyll-seo-tag) plugin preinstalled to make sure your website gets the most useful meta tags. See [usage](https://github.com/jekyll/jekyll-seo-tag#usage) to know how to set it up.
|
88
|
+
|
89
|
+
## Usage
|
90
|
+
|
91
|
+
Have the following line in your config file:
|
92
|
+
|
93
|
+
```yaml
|
94
|
+
theme: jekyll-theme-mnc
|
95
|
+
```
|
96
|
+
|
97
|
+
### Customizing templates
|
98
|
+
|
99
|
+
To override the default structure and style of MNC, simply create the concerned directory at the root of your site, copy the file you wish to customize to that directory, and then edit the file.
|
100
|
+
|
101
|
+
e.g., to override the [`_includes/head.html `](_includes/head.html) file to specify a custom style path, create an `_includes` directory, copy `_includes/head.html` from MNC gem folder to `<yoursite>/_includes` and start editing that file.
|
102
|
+
|
103
|
+
The site's default CSS has now moved to a new place within the gem itself, [`assets/css/style.scss`](assets/css/style.scss).
|
104
|
+
|
105
|
+
If you only need to customize the colors of the theme, refer to the subsequent section on skins. To have your *CSS overrides* in sync with upstream changes released in future versions, you can collect all your overrides for the Sass variables and mixins inside a sass file placed at `_sass/jekyll-theme-mnc/custom-variables.scss` and all other overrides inside a sass file placed at path `_sass/jekyll-theme-mnc/custom-styles.scss`.
|
106
|
+
|
107
|
+
You need not maintain entire partial(s) at the site's source just to override a few styles. However, your stylesheet's primary source (`assets/css/style.scss`) should contain the following:
|
108
|
+
|
109
|
+
- Front matter dashes at the very beginning (can be empty).
|
110
|
+
- Directive to import a skin.
|
111
|
+
- Directive to import the base styles (automatically loads overrides when available).
|
112
|
+
|
113
|
+
Therefore, your `assets/css/style.scss` should contain the following at minimum:
|
114
|
+
|
115
|
+
```sass
|
116
|
+
---
|
117
|
+
---
|
118
|
+
|
119
|
+
@import
|
120
|
+
"jekyll-theme-mnc/skins/{{ site.jekyll-theme-mnc.skin | default: 'classic' }}",
|
121
|
+
"jekyll-theme-mnc/initialize";
|
122
|
+
```
|
123
|
+
|
124
|
+
#### Skins
|
125
|
+
|
126
|
+
MNC supports defining and switching between multiple color-palettes (or *skins*).
|
127
|
+
|
128
|
+
```
|
129
|
+
.
|
130
|
+
├── jekyll-theme-mnc.scss
|
131
|
+
└── jekyll-theme-mnc
|
132
|
+
└── _syntax-highlighting.scss
|
133
|
+
```
|
134
|
+
|
135
|
+
A skin is a Sass file placed in the directory `_sass/jekyll-theme-mnc/skins` and it defines the variable defaults related to the "color" aspect of the theme. It also embeds the Sass rules related to syntax-highlighting since that is primarily related to color and has to be adjusted in harmony with the current skin.
|
136
|
+
|
137
|
+
The default color palette for MNC is defined within `_sass/jekyll-theme-mnc/skins/classic.scss`. To switch to another available skin, simply declare it in the site's config file. For example, to activate `_sass/jekyll-theme-mnc/skins/dark.scss` as the skin, the setting would be:
|
138
|
+
|
139
|
+
```yaml
|
140
|
+
jekyll-theme-mnc:
|
141
|
+
skin: dark
|
142
|
+
```
|
143
|
+
|
144
|
+
##### Available skins
|
145
|
+
|
146
|
+
Skin setting | Description
|
147
|
+
--------------- | -----------
|
148
|
+
classic | Default, light color scheme.
|
149
|
+
dark | Dark variant of the classic skin.
|
150
|
+
auto | *Adaptive skin* based on the default classic and dark skins.
|
151
|
+
solarized | *Adaptive skin* for [solarized](https://github.com/solarized) color scheme skins.
|
152
|
+
solarized-light | Light variant of solarized color scheme.
|
153
|
+
solarized-dark | Dark variant of solarized color scheme.
|
154
|
+
|
155
|
+
*:bulb: Adaptive skins switch between the "light" and "dark" variants based on the user's operating system setting or browser setting (via CSS Media Query [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)).*
|
156
|
+
|
157
|
+
### Category support
|
158
|
+
|
159
|
+
First, add one or many categories to the post's frontmatter:
|
160
|
+
|
161
|
+
```yaml
|
162
|
+
categories: [First, Second, "My Third"]
|
163
|
+
```
|
164
|
+
|
165
|
+
#### Category navigation links
|
166
|
+
|
167
|
+
For categories to be properly linked, the site needs a `category` folder having separate markdown files for each category. E.g. for the category "first" a file called `first.md` in `category` with the following content:
|
168
|
+
|
169
|
+
```yaml
|
170
|
+
---
|
171
|
+
title: "First"
|
172
|
+
excerpt: A description for the head's meta description tag created by jekyll-seo-tag
|
173
|
+
permalink: /category/first
|
174
|
+
sitemap: false
|
175
|
+
layout: category
|
176
|
+
---
|
177
|
+
```
|
178
|
+
|
179
|
+
The title and permalink have to match the corresponding filename and category name. The category slug `category` in e.g. `https://example.com/category/first` is user-configurable in `_config.yaml`:
|
180
|
+
|
181
|
+
```yaml
|
182
|
+
jekyll-theme-mnc:
|
183
|
+
category_slug: category
|
184
|
+
```
|
185
|
+
|
186
|
+
Used categories will be included automatically in the navigation menu after ordinary pages, which are declared with `header_pages` (see below). Spaces will be automatically converted to hyphens, so the above permalink has to mirror this.
|
187
|
+
|
188
|
+
### Customize navigation links
|
189
|
+
|
190
|
+
This allows you to set which pages you want to appear in the navigation area and configure order of the links.
|
191
|
+
|
192
|
+
For instance, to only link to the `about` and the `portfolio` page, add the following to your `_config.yml`:
|
193
|
+
|
194
|
+
```yaml
|
195
|
+
jekyll-theme-mnc:
|
196
|
+
header_pages:
|
197
|
+
- about.md
|
198
|
+
- portfolio.md
|
199
|
+
```
|
200
|
+
|
201
|
+
### Change default date format
|
202
|
+
|
203
|
+
You can change the default date format by specifying `site.jekyll-theme-mnc.date_format`
|
204
|
+
in `_config.yml`.
|
205
|
+
|
206
|
+
```yaml
|
207
|
+
# Refer to https://shopify.github.io/liquid/filters/date/ if you want to customize this
|
208
|
+
jekyll-theme-mnc:
|
209
|
+
date_format: "%Y-%m-%d"
|
210
|
+
```
|
211
|
+
|
212
|
+
### Favicon Support for Feeds
|
213
|
+
|
214
|
+
You can declare an icon for the tumblelog in `_config.yml`.
|
215
|
+
|
216
|
+
```yaml
|
217
|
+
tumblelog_icon: /icon.png
|
218
|
+
```
|
219
|
+
|
220
|
+
### Header Image Support
|
221
|
+
|
222
|
+
A header image is displayed before the title on posts and pages, if `image` is added to the file's frontmatter.
|
223
|
+
|
224
|
+
```yaml
|
225
|
+
---
|
226
|
+
image: /images/sample-image.jpg
|
227
|
+
image_alt: The description of the image
|
228
|
+
image_title: The title of the image
|
229
|
+
---
|
230
|
+
```
|
231
|
+
|
232
|
+
This image is also used in feeds and SEO tags as the displayed image.
|
233
|
+
|
234
|
+
### Extending the `<head />`
|
235
|
+
|
236
|
+
You can *add* custom metadata to the `<head />` of your layouts by creating a file `_includes/custom-head.html` in your source directory. For example, to add favicons:
|
237
|
+
|
238
|
+
1. Head over to [https://realfavicongenerator.net/](https://realfavicongenerator.net/) to add your own favicons.
|
239
|
+
2. [Customize](#customization) default `_includes/custom-head.html` in your source directory and insert the given code snippet.
|
240
|
+
|
241
|
+
### Author Metadata
|
242
|
+
|
243
|
+
`site.author` is expected to be a mapping of attributes:
|
244
|
+
|
245
|
+
```yaml
|
246
|
+
author:
|
247
|
+
name: John Smith
|
248
|
+
email: "john.smith@example.com"
|
249
|
+
```
|
250
|
+
|
251
|
+
### Social networks
|
252
|
+
|
253
|
+
You can add links to the accounts you have on other sites, with respective icon, by adding one or more of the following options in your config. The usernames are to be nested under `jekyll-theme-mnc.social_links`, with the keys being simply the social-network's name:
|
254
|
+
|
255
|
+
```yaml
|
256
|
+
jekyll-theme-mnc:
|
257
|
+
social_links:
|
258
|
+
twitter: jekyllrb
|
259
|
+
github: jekyll
|
260
|
+
stackoverflow: "11111"
|
261
|
+
dribbble: jekyll
|
262
|
+
facebook: jekyll
|
263
|
+
flickr: jekyll
|
264
|
+
instagram: jekyll
|
265
|
+
linkedin: jekyll
|
266
|
+
xing: jekyll
|
267
|
+
pinterest: jekyll
|
268
|
+
telegram: jekyll
|
269
|
+
microdotblog: jekyll
|
270
|
+
keybase: jekyll
|
271
|
+
|
272
|
+
mastodon:
|
273
|
+
- username: jekyll
|
274
|
+
instance: example.com
|
275
|
+
- username: jekyll2
|
276
|
+
instance: example.com
|
277
|
+
|
278
|
+
gitlab:
|
279
|
+
- username: jekyll
|
280
|
+
instance: example.com
|
281
|
+
- username: jekyll2
|
282
|
+
instance: example.com
|
283
|
+
|
284
|
+
youtube: jekyll
|
285
|
+
youtube_channel: UC8CXR0-3I70i1tfPg1PAE1g
|
286
|
+
youtube_channel_name: CloudCannon
|
287
|
+
```
|
288
|
+
|
289
|
+
### Enabling Analytics
|
290
|
+
|
291
|
+
To enable analytics, you will need a third-party analytics account. Follow their instructions of how to get their code snippet, which has to be added to your site. Copy this snippet and paste it into `analytics.html` in folder `_includes`.
|
292
|
+
|
293
|
+
To enable this in MNC, add the following lines to your Jekyll site to turn analytics processing on:
|
294
|
+
|
295
|
+
```yaml
|
296
|
+
jekyll-theme-mnc:
|
297
|
+
analytics: true
|
298
|
+
```
|
299
|
+
|
300
|
+
Analytics will only appear in production, i.e., not while testing the site on your local device.
|
301
|
+
|
302
|
+
### Enabling Excerpts on the Home Page
|
303
|
+
|
304
|
+
To display post excerpts on the home page, simply add the following to your `_config.yml`:
|
305
|
+
|
306
|
+
```yaml
|
307
|
+
show_excerpts: true
|
308
|
+
```
|
309
|
+
|
310
|
+
### Reading Time
|
311
|
+
|
312
|
+
The reading time is calculated and display at the beginning of each post. To adjust the reading speed, simply add the following to your `_config.yml` and choose a number for words per minute:
|
313
|
+
|
314
|
+
```yaml
|
315
|
+
reading-speed: 180
|
316
|
+
```
|
317
|
+
|
318
|
+
## Contributing
|
319
|
+
|
320
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/michaelnordmeyer/jekyll-theme-mnc. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
|
321
|
+
|
322
|
+
## Development
|
323
|
+
|
324
|
+
To set up your environment to develop this theme, run `script/bootstrap`.
|
325
|
+
|
326
|
+
To test your theme, run `script/server` (or `bundle exec jekyll serve`) and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme and the contents. As you make modifications, your site will regenerate and you should see the changes in the browser after a refresh.
|
327
|
+
|
328
|
+
## License
|
329
|
+
|
330
|
+
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<p><small>Subscribe to updates <a href="{{ '/feed.xml' | relative_url }}" rel="alternate nofollow">via Atom feed</a> or <a href="{{ '/feed.json' | relative_url }}" rel="alternate nofollow">via JSON feed</a></small></p>
|
data/_includes/head.html
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
<head>
|
2
|
+
<meta charset="utf-8">
|
3
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
4
|
+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#fdfdfd">
|
5
|
+
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#181818">
|
6
|
+
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
|
7
|
+
<link rel="icon" href="{{ site.icon | default: 'data:;base64,=' }}">
|
8
|
+
{% feed_meta %}
|
9
|
+
<link type="application/feed+json" rel="alternate" href="{{ '/feed.json' | relative_url }}" title="{{ site.title | escape }}">
|
10
|
+
{% seo %}
|
11
|
+
{%- if jekyll.environment == 'production' and site.jekyll-theme-mnc.analytics -%}
|
12
|
+
{% include analytics.html %}
|
13
|
+
{%- endif -%}
|
14
|
+
{% include custom-head.html %}
|
15
|
+
</head>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<header><div>
|
2
|
+
{%- assign default_paths = site.pages | map: "path" -%}
|
3
|
+
{%- assign page_paths = site.jekyll-theme-mnc.header_pages | default: default_paths -%}
|
4
|
+
{%- assign pages_with_titles = site.pages | map: 'title' | join: '' | size %}
|
5
|
+
<h2><a rel="author" href="{{ '/' | relative_url }}">{{ site.title | escape }}</a></h2>
|
6
|
+
{% if site.description -%}
|
7
|
+
<p>{{ site.description }}</p>
|
8
|
+
{%- endif %}
|
9
|
+
|
10
|
+
{%- if pages_with_titles > 0 %}
|
11
|
+
<nav aria-label="Navigation" itemscope itemtype="https://schema.org/SiteNavigationElement">
|
12
|
+
{% for path in page_paths -%}
|
13
|
+
{%- assign my_page = site.pages | where: "path", path | first -%}
|
14
|
+
{% if my_page.title -%}
|
15
|
+
<a itemprop="url" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
|
16
|
+
{%- unless forloop.last %} • {% endunless -%}
|
17
|
+
{% endif %}
|
18
|
+
{%- endfor -%}
|
19
|
+
{%- if site.categories.size > 0 %}
|
20
|
+
•
|
21
|
+
{%- endif %}
|
22
|
+
{%- assign category_paths = site.categories | default: default_paths -%}
|
23
|
+
{%- assign sorted_categories = site.categories | sort -%}
|
24
|
+
{% for category in sorted_categories %}
|
25
|
+
<a itemprop="url" href="{{ site.baseurl }}/{{ site.jekyll-theme-mnc.category_slug}}/{{ category[0] | slugify }}">{{ category[0] | escape }}</a>
|
26
|
+
{%- unless forloop.last %} • {% endunless -%}
|
27
|
+
{%- endfor %}
|
28
|
+
</nav>
|
29
|
+
{%- endif %}
|
30
|
+
</div></header>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<header><div>
|
2
|
+
{%- assign default_paths = site.pages | map: "path" -%}
|
3
|
+
{%- assign page_paths = site.jekyll-theme-mnc.header_pages | default: default_paths -%}
|
4
|
+
{%- assign pages_with_titles = site.pages | map: 'title' | join: '' | size %}
|
5
|
+
<h2><a rel="author" href="{{ '/' | relative_url }}">{{ site.title | escape }}</a></h2>
|
6
|
+
|
7
|
+
{%- if pages_with_titles > 0 %}
|
8
|
+
<nav aria-label="Navigation" itemscope itemtype="https://schema.org/SiteNavigationElement">
|
9
|
+
<details>
|
10
|
+
<summary>
|
11
|
+
<svg viewBox="0 0 18 16" width="18px" height="16px">
|
12
|
+
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z" />
|
13
|
+
</svg>
|
14
|
+
</summary>
|
15
|
+
{% for path in page_paths -%}
|
16
|
+
{%- assign my_page = site.pages | where: "path", path | first -%}
|
17
|
+
{%- if my_page.title %}
|
18
|
+
<a itemprop="url" href="{{ my_page.url | relative_url }}">{{ my_page.title | smartify }}</a>
|
19
|
+
{%- endif -%}
|
20
|
+
{%- endfor %}
|
21
|
+
{%- assign category_paths = site.categories | default: default_paths -%}
|
22
|
+
{%- assign sorted_categories = site.categories | sort -%}
|
23
|
+
{% for category in sorted_categories %}
|
24
|
+
<a itemprop="url" href="{{ site.baseurl }}/{{ site.jekyll-theme-mnc.category_slug}}/{{ category[0] | slugify }}" rel="nofollow">{{ category[0] | smartify }}</a>
|
25
|
+
{%- endfor %}
|
26
|
+
</details>
|
27
|
+
</nav>
|
28
|
+
{%- endif %}
|
29
|
+
</div></header>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<article>
|
2
|
+
<header>
|
3
|
+
<time datetime="{{ post.date | date_to_xmlschema }}" itemprop="datePublished">{{ post.date | date: date_format }}</time>
|
4
|
+
<h3><a href="{{ post.url | relative_url }}">{{ post.title | smartify }}</a></h3>
|
5
|
+
</header>
|
6
|
+
{% if site.show_excerpts -%}
|
7
|
+
<p>
|
8
|
+
{{ post.excerpt | strip_html | smartify }}
|
9
|
+
</p>
|
10
|
+
{%- endif %}
|
11
|
+
</article>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<form method="get" id="search" action="https://duckduckgo.com/">
|
2
|
+
<input type="search" name="q" placeholder="Search…" aria-label="Search">
|
3
|
+
<input type="hidden" name="sites" value="{{ site.url | replace:'https://','' | replace:'http://','' }}">
|
4
|
+
<input type="hidden" name="k7" value="w">
|
5
|
+
<input type="hidden" name="k8" value="#111111">
|
6
|
+
<input type="hidden" name="k9" value="#2a7ae2">
|
7
|
+
<input type="hidden" name="kaa" value="#1756a9">
|
8
|
+
<input type="hidden" name="kt" value="h">
|
9
|
+
<input type="hidden" name="ko" value="-2">
|
10
|
+
<input type="hidden" name="k1" value="-1">
|
11
|
+
<input type="hidden" name="kaf" value="1">
|
12
|
+
<input type="submit" value="Search">
|
13
|
+
</form>
|