no-style-please 0.3.1 → 0.4.5
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 +4 -4
- data/README.md +32 -5
- data/_config.yml +4 -3
- data/_includes/back_link.html +1 -0
- data/_includes/head.html +7 -7
- data/_includes/menu_item.html +18 -11
- data/_includes/post_list.html +23 -7
- data/_layouts/archive.html +9 -0
- data/_layouts/default.html +9 -9
- data/_layouts/home.html +5 -3
- data/_layouts/page.html +9 -0
- data/_layouts/post.html +11 -3
- data/_sass/no-style-please.scss +12 -7
- metadata +12 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a75f72980cec679b2f510ebaf60298450df36bf2dda826988ecac6025579bab
|
4
|
+
data.tar.gz: 4bbe9d0f31780d74b3f2275dc5146764fe298f26c38cc0c3b062e929383be4cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 785e8b9348b1d1b7fd882b6e2ef30f434624e0e0ae6d1208782a1379012329645f9ee59f242cdf35eb6b42f565141ce9f20b2d23e264e5591fbd6eebbacbfbd5
|
7
|
+
data.tar.gz: bc9705bba1b392e8552a8d7b147f2229dfa4a3785de6576fbc8edd1a48965ac3f9809df496560bc9d41bab7e5f96babc5835343a245cc58bb9e7bb520db4bce6
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Inspired by [elly's site](http://tilde.town/~elly/), expressly created for [my p
|
|
9
9
|
|
10
10
|
## Features
|
11
11
|
|
12
|
-
* Fast (
|
12
|
+
* Fast (**1kb of CSS!** For more information on performance and more, see [Page Speed Insights report](https://raw.githubusercontent.com/riggraz/no-style-please/master/_screenshots/page-speed-insights-report.png) and [Lighthouse report](https://raw.githubusercontent.com/riggraz/no-style-please/master/_screenshots/lighthouse-report.png))
|
13
13
|
* Light, dark and auto modes
|
14
14
|
* Responsive
|
15
15
|
* Content first (typography optimized for maximum readability)
|
@@ -61,12 +61,39 @@ The `menu.yml` file accepts the following fields:
|
|
61
61
|
|
62
62
|
- `entries` define a new unordered list that will contain menu entries
|
63
63
|
- each entry is marked by a `-` at the beginning of the line
|
64
|
-
- each entry
|
65
|
-
- `title`, which defines the text to render for
|
66
|
-
- `url`, which can
|
67
|
-
- `post_list`, which can be `true` or
|
64
|
+
- each entry can have the following attributes:
|
65
|
+
- `title`, which defines the text to render for this menu entry (**NB: you can also specify HTML!**)
|
66
|
+
- `url`, which can be used to specify an URL for this entry. If not specified, `title` will be rendered as-is; otherwise `title` will be sorrounded by a link tag pointing to the specified URL. Note that the URL can either be relative or absolute. Also note that you can get the same result by placing an ```<a>``` tag in the `title` field.
|
67
|
+
- `post_list`, which can be set either to `true` or to an object. If it is true, the entry will have a list of all posts as subentries. This is used to render your post list. If you want to customize which posts to render (e.g. by category), you can add one or more of the following attributes under `post_list`:
|
68
|
+
- `category`, which can be set to a string. It is used to render a list of posts of the specified category only. If you don't set it, then posts of all categories will be rendered.
|
69
|
+
- `limit`, which can be set to a number. It specifies the number of posts to show. If not set, all posts will be rendered.
|
70
|
+
- `show_more`, which can be true. If it is true and if the number of posts to show is greater than the specified `limit`, render a link to another page. To specify the URL and the text of the link, you can set `show_more_url` and `show_more_text` attributes, which are documented below.
|
71
|
+
- `show_more_url`, which can be a string. It specifies the URL for the show more link. Use only if `show_more` is true. This will usually redirect to a page containing all posts, which you can easily create using an archive page (see [create archive pages](#create-archive-pages) section)
|
72
|
+
- `show_more_text`, which can be a string. It specifies the text for the show more link. Use only if `show_more` is true.
|
68
73
|
- `entries`, yes, you can have entries inside entries. In this way you can create nested sublists!
|
69
74
|
|
75
|
+
### Create archive pages
|
76
|
+
|
77
|
+
A so-called archive page is a page that shows a list of posts (see [this](https://riggraz.dev/no-style-please/all-posts) for an example). You can create an archive page by creating a page and putting the following frontmatter:
|
78
|
+
|
79
|
+
```
|
80
|
+
---
|
81
|
+
layout: archive
|
82
|
+
title: The title of the page here
|
83
|
+
which_category: name-of-category
|
84
|
+
---
|
85
|
+
```
|
86
|
+
|
87
|
+
`which_category` is optional: if you don't put it, then all posts of the blog will be listed; on the other hand, if you specify a category, only posts of that category will be shown.
|
88
|
+
|
89
|
+
This feature is particularly useful if used together with the `show_more` attribute in the menu. For example, if you want to limit the number of posts shown in the home page to 5 but add a link to view them all, then you can create an archive page using the method showed above and link to it using the `show_more_url` attribute in `menu.yml`. See [this example](https://github.com/riggraz/no-style-please/blob/master/_data/menu.yml) if you're in doubt.
|
90
|
+
|
91
|
+
### Customize the index page
|
92
|
+
|
93
|
+
The `index.md` page should use layout `home`, which is the layout that displays the menu. If you want to have some content after the menu, you can just add that content in the `index.md` file, and it will automatically show under the menu.
|
94
|
+
|
95
|
+
Another thing you can do to customize the index page is show the description of your blog between the title and the menu. To do this, just edit `_config.yml` and change `theme_config.show_description` to `true`.
|
96
|
+
|
70
97
|
### Pro tips
|
71
98
|
|
72
99
|
#### Dark mode for images
|
data/_config.yml
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
title: no style, please! # name of the site
|
2
2
|
author: Riccardo Graziosi # name of site's author
|
3
3
|
email: riccardo.graziosi97@gmail.com # email of site's author
|
4
|
-
url: https://riggraz.dev
|
4
|
+
url: https://riggraz.dev # root address of the site
|
5
|
+
baseurl: "/no-style-please" # subpath of the site, e.g. "/blog" (leave it blank "" if you're site shouldn't use a subpath)
|
5
6
|
description: > # description of the site (multiple lines allowed)
|
6
7
|
A (nearly) no-CSS, fast, minimalist Jekyll theme.
|
7
8
|
|
8
9
|
permalink: /:slug.html
|
9
10
|
|
10
|
-
favicon: "
|
11
|
+
favicon: "logo.png" # name+extension of favicon (which must be put on the root folder)
|
11
12
|
# goat_counter: "yoursitename" # put your GoatCounter name if you want to use GoatCounter analytics
|
12
13
|
|
13
14
|
theme: no-style-please # if you are using GitHub Pages, change it to remote_theme: riggraz/no-style-please
|
@@ -23,4 +24,4 @@ sass:
|
|
23
24
|
|
24
25
|
plugins:
|
25
26
|
- jekyll-feed
|
26
|
-
- jekyll-seo-tag
|
27
|
+
- jekyll-seo-tag
|
@@ -0,0 +1 @@
|
|
1
|
+
<a href="{{ "/" | relative_url }}">{{ site.theme_config.back_home_text }}</a>
|
data/_includes/head.html
CHANGED
@@ -4,16 +4,16 @@
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
5
5
|
|
6
6
|
<title>
|
7
|
-
{
|
7
|
+
{%- if page.title -%}
|
8
8
|
{{ page.title }}
|
9
|
-
{
|
9
|
+
{%- else -%}
|
10
10
|
{{ site.title }}
|
11
|
-
{
|
11
|
+
{%- endif -%}
|
12
12
|
</title>
|
13
13
|
|
14
|
-
{
|
15
|
-
{
|
14
|
+
{%-seo title=false-%}
|
15
|
+
{%-feed_meta-%}
|
16
16
|
|
17
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
18
|
-
<link rel="stylesheet" href="{{
|
17
|
+
<link rel="shortcut icon" type="image/x-icon" href="{{ site.favicon | relative_url }}" />
|
18
|
+
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}" />
|
19
19
|
</head>
|
data/_includes/menu_item.html
CHANGED
@@ -1,19 +1,26 @@
|
|
1
1
|
<ul>
|
2
|
-
{
|
2
|
+
{%-for item in include.collection-%}
|
3
3
|
<li>
|
4
|
-
{
|
4
|
+
{%- if item.url -%}
|
5
5
|
<a href="{{ item.url }}">{{ item.title }}</a>
|
6
|
-
{
|
6
|
+
{%- else -%}
|
7
7
|
{{ item.title }}
|
8
|
-
{
|
8
|
+
{%- endif -%}
|
9
9
|
</li>
|
10
10
|
|
11
|
-
{
|
12
|
-
{%
|
13
|
-
|
11
|
+
{%-if item.post_list-%}
|
12
|
+
{%
|
13
|
+
include post_list.html
|
14
|
+
category=item.post_list.category
|
15
|
+
limit=item.post_list.limit
|
16
|
+
show_more=item.post_list.show_more
|
17
|
+
show_more_text=item.post_list.show_more_text
|
18
|
+
show_more_url=item.post_list.show_more_url
|
19
|
+
-%}
|
20
|
+
{%-endif-%}
|
14
21
|
|
15
|
-
{
|
16
|
-
{
|
17
|
-
{
|
18
|
-
{
|
22
|
+
{%-if item.entries-%}
|
23
|
+
{%-include menu_item.html collection=item.entries-%}
|
24
|
+
{%-endif-%}
|
25
|
+
{%-endfor-%}
|
19
26
|
</ul>
|
data/_includes/post_list.html
CHANGED
@@ -1,9 +1,25 @@
|
|
1
|
-
{
|
1
|
+
{%-if include.category-%}
|
2
|
+
{%-assign posts = site.categories[include.category]-%}
|
3
|
+
{%-else-%}
|
4
|
+
{%-assign posts = site.posts-%}
|
5
|
+
{%-endif-%}
|
6
|
+
|
7
|
+
{%-if include.limit and posts.size > include.limit-%}
|
8
|
+
{%-assign limit_exceeded = true-%}
|
9
|
+
{%-else-%}
|
10
|
+
{%-assign limit_exceeded = false-%}
|
11
|
+
{%-endif-%}
|
12
|
+
|
13
|
+
{%- if posts.size > 0 -%}
|
2
14
|
<ul>
|
3
|
-
{
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
15
|
+
{%- for post in posts limit: include.limit -%}
|
16
|
+
<li>
|
17
|
+
<span>{{- post.date | date: site.theme_config.date_format -}}</span>
|
18
|
+
<a href="{{ post.url | relative_url }}">{{ post.title | downcase }}</a>
|
19
|
+
</li>
|
20
|
+
{%- endfor -%}
|
21
|
+
{%- if include.show_more and limit_exceeded -%}
|
22
|
+
<li><a href="{{ include.show_more_url }}">{{ include.show_more_text | default: "Show more..." }}</a></li>
|
23
|
+
{%- endif -%}
|
8
24
|
</ul>
|
9
|
-
{
|
25
|
+
{%- endif -%}
|
data/_layouts/default.html
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="{{ page.lang | default: "en" }}">
|
3
|
-
|
4
|
-
|
3
|
+
{%- include head.html -%}
|
4
|
+
<body a="{{ site.theme_config.appearance | default: "auto" }}">
|
5
5
|
<main class="page-content" aria-label="Content">
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
<div class="w">
|
7
|
+
{{ content }}
|
8
|
+
</div>
|
9
9
|
</main>
|
10
10
|
|
11
|
-
{
|
12
|
-
|
13
|
-
{
|
14
|
-
|
11
|
+
{%-if site.goat_counter and jekyll.environment == "production"-%}
|
12
|
+
{%-include goat_counter.html-%}
|
13
|
+
{%-endif-%}
|
14
|
+
</body>
|
15
15
|
</html>
|
data/_layouts/home.html
CHANGED
@@ -3,9 +3,11 @@ layout: default
|
|
3
3
|
---
|
4
4
|
<header>
|
5
5
|
<h1>{{ site.title }}</h1>
|
6
|
-
{
|
6
|
+
{%-if site.theme_config.show_description-%}
|
7
7
|
<p>{{ site.description }}</p>
|
8
|
-
{
|
8
|
+
{%-endif-%}
|
9
9
|
</header>
|
10
10
|
|
11
|
-
{
|
11
|
+
{%-include menu_item.html collection=site.data.menu.entries-%}
|
12
|
+
|
13
|
+
{{ content }}
|
data/_layouts/page.html
ADDED
data/_layouts/post.html
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
layout: default
|
3
3
|
---
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
{%-include back_link.html-%}
|
6
|
+
|
7
|
+
<article>
|
8
|
+
<p class="post-meta">
|
9
|
+
<time datetime="{{ page.date }}">{{ page.date | date: site.theme_config.date_format }}</time>
|
10
|
+
</p>
|
11
|
+
|
12
|
+
<h1>{{ page.title }}</h1>
|
13
|
+
|
14
|
+
{{ content }}
|
15
|
+
</article>
|
data/_sass/no-style-please.scss
CHANGED
@@ -19,20 +19,22 @@ body[a="dark"] { @include dark-appearance; }
|
|
19
19
|
// bg color is also needed in html in order to
|
20
20
|
// block body's background propagation
|
21
21
|
// see: https://stackoverflow.com/a/61265706
|
22
|
-
html, body { background
|
22
|
+
html, body { background: white; }
|
23
23
|
|
24
24
|
html { height: 100%; }
|
25
25
|
|
26
26
|
body {
|
27
27
|
color: black;
|
28
28
|
font-family: monospace;
|
29
|
-
font-size:
|
30
|
-
line-height: 1.
|
29
|
+
font-size: 16px;
|
30
|
+
line-height: 1.4;
|
31
31
|
margin: 0;
|
32
32
|
min-height: 100%;
|
33
33
|
}
|
34
34
|
|
35
|
-
|
35
|
+
.post-meta { text-align: right; }
|
36
|
+
|
37
|
+
h2, h3, h4, h5, h6 { margin-top: 3rem; }
|
36
38
|
|
37
39
|
hr { margin: 2rem 0; }
|
38
40
|
|
@@ -40,9 +42,10 @@ p { margin: 1rem 0; }
|
|
40
42
|
|
41
43
|
li { margin: 0.4rem 0; }
|
42
44
|
|
43
|
-
*:target { background
|
45
|
+
*:target { background: yellow; }
|
44
46
|
|
45
47
|
.w {
|
48
|
+
width: fit-content;
|
46
49
|
max-width: 640px;
|
47
50
|
margin: 0 auto;
|
48
51
|
padding: 4rem 2rem;
|
@@ -56,8 +59,9 @@ hr {
|
|
56
59
|
&:after { content: attr(data-content) '/////' }
|
57
60
|
}
|
58
61
|
|
62
|
+
table { width: 100%; }
|
63
|
+
|
59
64
|
table, th, td {
|
60
|
-
width: 100%;
|
61
65
|
border: thin solid black;
|
62
66
|
border-collapse: collapse;
|
63
67
|
padding: 0.4rem;
|
@@ -65,12 +69,13 @@ table, th, td {
|
|
65
69
|
|
66
70
|
code {
|
67
71
|
color: white;
|
68
|
-
background
|
72
|
+
background: black;
|
69
73
|
}
|
70
74
|
|
71
75
|
div.highlighter-rouge code {
|
72
76
|
display: block;
|
73
77
|
overflow-x: auto;
|
78
|
+
white-space: pre-wrap;
|
74
79
|
padding: 1rem;
|
75
80
|
}
|
76
81
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no-style-please
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Riccardo Graziosi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.9.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
26
|
+
version: 3.9.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: jekyll-feed
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.15.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.15.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jekyll-seo-tag
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.7.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.7.1
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- riccardo.graziosi97@gmail.com
|
@@ -62,12 +62,15 @@ files:
|
|
62
62
|
- LICENSE.txt
|
63
63
|
- README.md
|
64
64
|
- _config.yml
|
65
|
+
- _includes/back_link.html
|
65
66
|
- _includes/goat_counter.html
|
66
67
|
- _includes/head.html
|
67
68
|
- _includes/menu_item.html
|
68
69
|
- _includes/post_list.html
|
70
|
+
- _layouts/archive.html
|
69
71
|
- _layouts/default.html
|
70
72
|
- _layouts/home.html
|
73
|
+
- _layouts/page.html
|
71
74
|
- _layouts/post.html
|
72
75
|
- _sass/no-style-please.scss
|
73
76
|
- assets/css/main.scss
|
@@ -90,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
93
|
- !ruby/object:Gem::Version
|
91
94
|
version: '0'
|
92
95
|
requirements: []
|
93
|
-
rubygems_version: 3.
|
96
|
+
rubygems_version: 3.0.3
|
94
97
|
signing_key:
|
95
98
|
specification_version: 4
|
96
99
|
summary: A (nearly) no-CSS, fast, minimalist Jekyll theme.
|