better-minima 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 112650866a7023e502e76fb1d3f8257e290a97c87147763e6893ea351ded0e5b
4
+ data.tar.gz: 0111def3425ba07aa25adedfad6a7f9c7650d3800a16c51819030d6b2d0e9136
5
+ SHA512:
6
+ metadata.gz: fe0218c1ba03a971fdd47dd61c2a054f54148ea9006540bc61a1da7062b7cb1676ab7e2ef19d2aedb3b8442d2b9844abac33c9d23ccb7efafef3ec1ae209ac32
7
+ data.tar.gz: 7c68e0dbd8c135cfe3972d0e636e9422fece0cc3ef61b6e817dc8522d5d9fb0494be7e3508e6bca41e0c2d0c0f5b3084968be87db57e9d788165ab1cf00f82d6
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016-present Parker Moore and the better-minima 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,312 @@
1
+ # better-minima
2
+
3
+ *Better-Minima is another one-size-fits-all Jekyll theme for writers*.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your Jekyll site's Gemfile:
8
+
9
+ ```ruby
10
+ gem "better-minima"
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+
18
+ ## Contents At-A-Glance
19
+
20
+ Better-Minima has been forked from Minima which was originally scaffolded by the `jekyll new-theme` command and therefore has all the necessary files and directories to have a new Jekyll site up and running with zero-configuration.
21
+
22
+ ### Layouts
23
+
24
+ Refers to files within the `_layouts` directory, that define the markup for your theme.
25
+
26
+ - `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`.
27
+ - `home.html` — The layout for your landing-page / home-page / index-page. [[More Info.](#home-layout)]
28
+ - `page.html` — The layout for your documents that contain FrontMatter, but are not posts.
29
+ - `post.html` — The layout for your posts.
30
+
31
+ #### Home Layout
32
+
33
+ `home.html` is a flexible HTML layout for the site's landing-page / home-page / index-page. <br/>
34
+
35
+ ##### *Main Heading and Content-injection*
36
+
37
+ From Minima v2.2 onwards, 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 (`##`)*.
38
+
39
+ 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.
40
+
41
+ ##### *Post Listing*
42
+
43
+ This section is optional from Minima v2.2 onwards.<br/>
44
+ 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`).
45
+
46
+ The title for this section is `Posts` by default and rendered with an `<h2>` tag. You can customize this heading by defining a `list_title` variable in the document's front matter.
47
+
48
+
49
+ ### Includes
50
+
51
+ 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.
52
+
53
+ - `disqus_comments.html` &mdash; Code to markup disqus comment box.
54
+ - `footer.html` &mdash; Defines the site's footer section.
55
+ - `google-analytics.html` &mdash; Inserts Google Analytics module (active only in production environment).
56
+ - `head.html` &mdash; Code-block that defines the `<head></head>` in *default* layout.
57
+ - `custom-head.html` &mdash; Placeholder to allow users to add more metadata to `<head />`.
58
+ - `header.html` &mdash; Defines the site's main header section. By default, pages with a defined `title` attribute will have links displayed here.
59
+ - `social.html` &mdash; Renders social-media icons based on the `minima:social_links` data in the config file.
60
+
61
+
62
+ ### Sass
63
+
64
+ Refers to `.scss` files within the `_sass` directory that define the theme's styles.
65
+
66
+ - `minima/skins/classic.scss` &mdash; The "classic" skin of the theme. *Used by default.*
67
+ - `minima/initialize.scss` &mdash; 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
+ - `minima/custom-variables.scss` &mdash; A hook that allows overriding variable defaults and mixins. (*Note: Cannot override styles*)
70
+ - `minima/_base.scss` &mdash; Sass partial for resets and defines base styles for various HTML elements.
71
+ - `minima/_layout.scss` &mdash; Sass partial that defines the visual style for various layouts.
72
+ - `minima/custom-styles.scss` &mdash; A hook that allows overriding styles defined above. (*Note: Cannot override variables*)
73
+
74
+ Refer the [skins](#skins) section for more details.
75
+
76
+
77
+ ### Assets
78
+
79
+ Refers to various asset files within the `assets` directory.
80
+
81
+ - `assets/css/style.scss` &mdash; Imports sass files from within the `_sass` directory and gets processed into the theme's
82
+ stylesheet: `assets/css/styles.css`.
83
+ - `assets/minima-social-icons.svg` &mdash; A composite SVG file comprised of *symbols* related to various social-media icons.
84
+ This file is used as-is without any processing. Refer [section on social networks](#social-networks) for its usage.
85
+
86
+
87
+ ### Plugins
88
+
89
+ Minima 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.
90
+
91
+
92
+ ## Usage
93
+
94
+ Have the following line in your config file:
95
+
96
+ ```yaml
97
+ theme: minima
98
+ ```
99
+
100
+
101
+ ### Customizing templates
102
+
103
+ To override the default structure and style of minima, 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.
104
+ 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 minima gem folder to `<yoursite>/_includes` and start editing that file.
105
+
106
+ The site's default CSS has now moved to a new place within the gem itself, [`assets/css/style.scss`](assets/css/style.scss).
107
+
108
+ In Minima 3.0, if you only need to customize the colors of the theme, refer to the subsequent section on skins. To have your
109
+ *CSS overrides* in sync with upstream changes released in future versions, you can collect all your overrides for the Sass
110
+ variables and mixins inside a sass file placed at `_sass/minima/custom-variables.scss` and all other overrides inside a sass file
111
+ placed at path `_sass/minima/custom.scss`.
112
+
113
+ You need not maintain entire partial(s) at the site's source just to override a few styles. However, your stylesheet's primary
114
+ source (`assets/css/style.scss`) should contain the following:
115
+
116
+ - Front matter dashes at the very beginning (can be empty).
117
+ - Directive to import a skin.
118
+ - Directive to import the base styles (automatically loads overrides when available).
119
+
120
+ Therefore, your `assets/css/style.scss` should contain the following at minimum:
121
+
122
+ ```sass
123
+ ---
124
+ ---
125
+
126
+ @import "minima/skins/{{ site.minima.skin | default: 'classic' }}";
127
+ @import "minima/initialize";
128
+ ```
129
+
130
+ #### Skins
131
+
132
+ Minima 3.0 supports defining and switching between multiple color-palettes (or *skins*).
133
+
134
+ ```
135
+ .
136
+ ├── minima.scss
137
+ └── minima
138
+ └── _syntax-highlighting.scss
139
+ ```
140
+
141
+
142
+ A skin is a Sass file placed in the directory `_sass/minima/skins` and it defines the variable defaults related to the "color"
143
+ aspect of the theme. It also embeds the Sass rules related to syntax-highlighting since that is primarily related to color and
144
+ has to be adjusted in harmony with the current skin.
145
+
146
+ The default color palette for Minima is defined within `_sass/minima/skins/classic.scss`. To switch to another available skin,
147
+ simply declare it in the site's config file. For example, to activate `_sass/minima/skins/dark.scss` as the skin, the setting
148
+ would be:
149
+
150
+ ```yaml
151
+ minima:
152
+ skin: dark
153
+ ```
154
+
155
+ As part of the migration to support skins, some existing Sass variables have been retired and some **have been redefined** as
156
+ summarized in the following table:
157
+
158
+ Minima 2.0 | Minima 3.0
159
+ --------------- | ----------
160
+ `$brand-color` | `$link-base-color`
161
+ `$grey-*` | `$brand-*`
162
+ `$orange-color` | *has been removed*
163
+
164
+ ##### Available skins
165
+
166
+ - classic
167
+ - dark
168
+ - solarized
169
+ - solarized-dark
170
+
171
+ ### Customize navigation links
172
+
173
+ This allows you to set which pages you want to appear in the navigation area and configure order of the links.
174
+
175
+ For instance, to only link to the `about` and the `portfolio` page, add the following to your `_config.yml`:
176
+
177
+ ```yaml
178
+ header_pages:
179
+ - about.md
180
+ - portfolio.md
181
+ ```
182
+
183
+
184
+ ### Change default date format
185
+
186
+ You can change the default date format by specifying `site.minima.date_format`
187
+ in `_config.yml`.
188
+
189
+ ```
190
+ # Minima date format
191
+ # refer to http://shopify.github.io/liquid/filters/date/ if you want to customize this
192
+ minima:
193
+ date_format: "%b %-d, %Y"
194
+ ```
195
+
196
+
197
+ ### Extending the `<head />`
198
+
199
+ 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:
200
+
201
+ 1. Head over to [https://realfavicongenerator.net/](https://realfavicongenerator.net/) to add your own favicons.
202
+ 2. [Customize](#customization) default `_includes/custom-head.html` in your source directory and insert the given code snippet.
203
+
204
+
205
+ ### Enabling comments (via Disqus)
206
+
207
+ Optionally, if you have a Disqus account, you can tell Jekyll to use it to show a comments section below each post.
208
+
209
+ To enable it, add the following lines to your Jekyll site:
210
+
211
+ ```yaml
212
+ disqus:
213
+ shortname: my_disqus_shortname
214
+ ```
215
+
216
+ You can find out more about Disqus' shortnames [here](https://help.disqus.com/installation/whats-a-shortname).
217
+
218
+ Comments are enabled by default and will only appear in production, i.e., `JEKYLL_ENV=production`
219
+
220
+ If you don't want to display comments for a particular post you can disable them by adding `comments: false` to that post's YAML Front Matter.
221
+
222
+ :warning: `url`, e.g. `https://example.com`, must be set in you config file for Disqus to work.
223
+
224
+ ### Author Metadata
225
+
226
+ From `Minima-3.0` onwards, `site.author` is expected to be a mapping of attributes instead of a simple scalar value:
227
+
228
+ ```yaml
229
+ author:
230
+ name: John Smith
231
+ email: "john.smith@foobar.com"
232
+ ```
233
+
234
+ To migrate existing metadata, update your config file and any reference to the object in your layouts and includes as summarized below:
235
+
236
+ Minima 2.x | Minima 3.0
237
+ ------------- | -------------------
238
+ `site.author` | `site.author.name`
239
+ `site.email` | `site.author.email`
240
+
241
+
242
+ ### Social networks
243
+
244
+ 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.
245
+ From `Minima-3.0` onwards, the usernames are to be nested under `minima.social_links`, with the keys being simply the social-network's name:
246
+
247
+ ```yaml
248
+ minima:
249
+ social_links:
250
+ twitter: jekyllrb
251
+ github: jekyll
252
+ stackoverflow: "11111"
253
+ dribbble: jekyll
254
+ facebook: jekyll
255
+ flickr: jekyll
256
+ instagram: jekyll
257
+ linkedin: jekyll
258
+ pinterest: jekyll
259
+ telegram: jekyll
260
+ microdotblog: jekyll
261
+ keybase: jekyll
262
+
263
+ mastodon:
264
+ - username: jekyll
265
+ instance: example.com
266
+ - username: jekyll2
267
+ instance: example.com
268
+
269
+ gitlab:
270
+ - username: jekyll
271
+ instance: example.com
272
+ - username: jekyll2
273
+ instance: example.com
274
+
275
+ youtube: jekyll
276
+ youtube_channel: UC8CXR0-3I70i1tfPg1PAE1g
277
+ youtube_channel_name: CloudCannon
278
+ ```
279
+
280
+
281
+ ### Enabling Google Analytics
282
+
283
+ To enable Google Analytics, add the following lines to your Jekyll site:
284
+
285
+ ```yaml
286
+ google_analytics: UA-NNNNNNNN-N
287
+ ```
288
+
289
+ Google Analytics will only appear in production, i.e., `JEKYLL_ENV=production`
290
+
291
+ ### Enabling Excerpts on the Home Page
292
+
293
+ To display post-excerpts on the Home Page, simply add the following to your `_config.yml`:
294
+
295
+ ```yaml
296
+ show_excerpts: true
297
+ ```
298
+
299
+
300
+ ## Contributing
301
+
302
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jekyll/minima. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
303
+
304
+ ## Development
305
+
306
+ To set up your environment to develop this theme, run `script/bootstrap`.
307
+
308
+ 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.
309
+
310
+ ## License
311
+
312
+ The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,6 @@
1
+ {% comment %}
2
+ Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons:
3
+
4
+ 1. Head over to https://realfavicongenerator.net/ to add your own favicons.
5
+ 2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet.
6
+ {% endcomment %}
@@ -0,0 +1,20 @@
1
+ {%- if page.comments != false and jekyll.environment == "production" -%}
2
+
3
+ <div id="disqus_thread"></div>
4
+ <script>
5
+ var disqus_config = function () {
6
+ this.page.url = '{{ page.url | absolute_url }}';
7
+ this.page.identifier = '{{ page.url | absolute_url }}';
8
+ };
9
+
10
+ (function() {
11
+ var d = document, s = d.createElement('script');
12
+
13
+ s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
14
+
15
+ s.setAttribute('data-timestamp', +new Date());
16
+ (d.head || d.body).appendChild(s);
17
+ })();
18
+ </script>
19
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
20
+ {%- endif -%}
@@ -0,0 +1,37 @@
1
+ <footer class="site-footer h-card">
2
+ <data class="u-url" href="{{ "/" | relative_url }}"></data>
3
+
4
+ <div class="wrapper">
5
+
6
+ <div class="footer-col-wrapper">
7
+ <div class="footer-col">
8
+ <p class="feed-subscribe">
9
+ <a href="{{ 'feed.xml' | relative_url }}">
10
+ <svg class="svg-icon orange">
11
+ <use xlink:href="{{ 'assets/minima-social-icons.svg#rss' | relative_url }}"></use>
12
+ </svg><span>Subscribe</span>
13
+ </a>
14
+ </p>
15
+ {%- if site.author %}
16
+ <ul class="contact-list">
17
+ {% if site.author.name -%}
18
+ <li class="p-name">{{ site.author.name | escape }}</li>
19
+ {% endif -%}
20
+ {% if site.author.email -%}
21
+ <li><a class="u-email" href="mailto:{{ site.author.email }}">{{ site.author.email }}</a></li>
22
+ {%- endif %}
23
+ </ul>
24
+ {%- endif %}
25
+ </div>
26
+ <div class="footer-col">
27
+ <p>{{ site.description | escape }}</p>
28
+ </div>
29
+ </div>
30
+
31
+ <div class="social-links">
32
+ {%- include social.html -%}
33
+ </div>
34
+
35
+ </div>
36
+
37
+ </footer>
@@ -0,0 +1,9 @@
1
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
2
+ <script>
3
+ window['ga-disable-{{ site.google_analytics }}'] = window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1";
4
+ window.dataLayer = window.dataLayer || [];
5
+ function gtag(){dataLayer.push(arguments);}
6
+ gtag('js', new Date());
7
+
8
+ gtag('config', '{{ site.google_analytics }}');
9
+ </script>
@@ -0,0 +1,14 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+ {%- seo -%}
6
+ <link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
7
+ {%- feed_meta -%}
8
+ {%- if jekyll.environment == 'production' and site.google_analytics -%}
9
+ {%- include google-analytics.html -%}
10
+ {%- endif -%}
11
+
12
+ {%- include custom-head.html -%}
13
+
14
+ </head>
@@ -0,0 +1,31 @@
1
+ <header class="site-header">
2
+
3
+ <div class="wrapper">
4
+ {%- assign default_paths = site.pages | map: "path" -%}
5
+ {%- assign page_paths = site.header_pages | default: default_paths -%}
6
+ {%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
7
+ <a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
8
+
9
+ {%- if titles_size > 0 -%}
10
+ <nav class="site-nav">
11
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
12
+ <label for="nav-trigger">
13
+ <span class="menu-icon">
14
+ <svg viewBox="0 0 18 15" width="18px" height="15px">
15
+ <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"/>
16
+ </svg>
17
+ </span>
18
+ </label>
19
+
20
+ <div class="trigger">
21
+ {%- for path in page_paths -%}
22
+ {%- assign my_page = site.pages | where: "path", path | first -%}
23
+ {%- if my_page.title -%}
24
+ <a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
25
+ {%- endif -%}
26
+ {%- endfor -%}
27
+ </div>
28
+ </nav>
29
+ {%- endif -%}
30
+ </div>
31
+ </header>