simple-gh-pages-theme 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -43
- data/_config.yml +57 -0
- data/_data/navigation.yml +2 -2
- data/_includes/highlights.html +4 -3
- data/_includes/sidebar-categories.html +4 -2
- data/_layouts/category-posts.html +6 -5
- data/_layouts/home.html +4 -0
- data/_layouts/index.html +1 -2
- data/_layouts/page.html +12 -0
- data/_layouts/posts.html +4 -3
- data/bin/install-theme +8 -0
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76f74777454e6c817541ffd856c597ceb29108fcfc2ca2e1ff8710929e5b12a8
|
4
|
+
data.tar.gz: f4bef2936b68df0052a2622e161eacfb0ae5e510eb2c37d1054bd9c4d097ec00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf6ba10ddddb570f4422e031bc33b48ce886e053c059d7375042a9c5c97a557ed32b6f81205b57cb015208b309c9ca2d0c7b07873479f357d0ca868bc0a9cc43
|
7
|
+
data.tar.gz: f3d8f92f9537a48deaff67323120ef1975e07b3c14bba368fd277d9f1142194f1da9767add52ba3ac1d812314818d22aeff59f0b3d3794c3b6fc37d774e398a6
|
data/README.md
CHANGED
@@ -11,57 +11,41 @@
|
|
11
11
|
simple-gh-pages-theme, after install and first post setup
|
12
12
|
</td>
|
13
13
|
<td>
|
14
|
-
in-use
|
14
|
+
in-use: https://jordiwippert.nl
|
15
15
|
</td>
|
16
16
|
</tr>
|
17
17
|
</table>
|
18
18
|
|
19
|
-
##
|
19
|
+
## Quick installation
|
20
|
+
|
21
|
+
1. Add this line to your Jekyll site's `Gemfile`:
|
20
22
|
|
21
|
-
Add this line to your Jekyll site's `Gemfile`:
|
22
23
|
```ruby
|
23
24
|
gem "simple-gh-pages-theme"
|
24
25
|
```
|
25
26
|
|
26
|
-
|
27
|
+
2. Add this line to your Jekyll site's `_config.yml`. Remove/disable possibly already enabled themes:
|
28
|
+
|
27
29
|
```yaml
|
28
30
|
theme: simple-gh-pages-theme
|
29
31
|
```
|
30
32
|
|
31
|
-
And then execute:
|
33
|
+
3. And then execute:
|
34
|
+
|
32
35
|
```shell
|
33
36
|
bundle
|
34
|
-
OR
|
35
|
-
gem install simple-gh-pages-theme
|
36
37
|
```
|
37
|
-
### !!! Important. To make the layouts work properly.
|
38
38
|
|
39
|
-
|
39
|
+
4. Run install script to create 'posts.md'
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
---
|
44
|
-
layout: index
|
45
|
-
---
|
46
|
-
```
|
47
|
-
- **about.markdown**:
|
48
|
-
```
|
49
|
-
---
|
50
|
-
layout: post
|
51
|
-
permalink: /about.html
|
52
|
-
---
|
53
|
-
```
|
54
|
-
- **posts.markdown**: (file might not exist yet)
|
55
|
-
```
|
56
|
-
---
|
57
|
-
layout: posts
|
58
|
-
---
|
59
|
-
```
|
60
|
-
- **404.markdown**: (file might not exist yet)
|
41
|
+
```shell
|
42
|
+
bundle exec install-theme
|
61
43
|
```
|
62
|
-
|
63
|
-
|
64
|
-
|
44
|
+
|
45
|
+
5. When you now run your website locally on `http://localhost:4000`, it should show the theme:
|
46
|
+
|
47
|
+
```shell
|
48
|
+
bundle exec jekyll serve
|
65
49
|
```
|
66
50
|
|
67
51
|
## Configuration:
|
@@ -69,6 +53,7 @@ layout: 404
|
|
69
53
|
See/use example config [here](https://github.com/LiveNL/simple-gh-pages-theme/blob/main/example-config.yml). Copy to `_config.yml`
|
70
54
|
|
71
55
|
## Usage
|
56
|
+
|
72
57
|
### Posts
|
73
58
|
|
74
59
|
Create your posts like:
|
@@ -87,20 +72,10 @@ categories: [category]
|
|
87
72
|
tags: [tag]
|
88
73
|
highlight: false (if true: it will be used on about page, more here)
|
89
74
|
short: false (if true: it shown in 'short' list on home page)
|
90
|
-
list_post: false (if true: it shown in list on home/posts page)
|
91
75
|
```
|
92
76
|
|
93
|
-
## Development
|
94
|
-
|
95
|
-
To set up your environment to develop this theme, run `bundle install`.
|
96
|
-
|
97
|
-
To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`.
|
98
|
-
|
99
|
-
This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
100
|
-
|
101
|
-
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
102
|
-
|
103
77
|
## Contributing
|
78
|
+
|
104
79
|
Bug reports and pull requests are welcome on GitHub at https://github.com/lvenl/simple-gh-pages-theme. 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.
|
105
80
|
|
106
81
|
## License
|
data/_config.yml
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
theme: simple-gh-pages-theme
|
2
|
+
title: "My website"
|
3
|
+
description: "The website description"
|
4
|
+
domain: "username.github.io"
|
5
|
+
baseurl: ""
|
6
|
+
url: ""
|
7
|
+
gtag: "G-XXXXXXXXX" # (your google tag)
|
8
|
+
|
9
|
+
about:
|
10
|
+
name: Firstname Lastname
|
11
|
+
site: "https://example.com"
|
12
|
+
avatar: assets/images/image.png
|
13
|
+
email: example@example.com
|
14
|
+
socials:
|
15
|
+
twitter: https://twitter.com/example
|
16
|
+
linkedin: https://www.linkedin.com/in/example/
|
17
|
+
github: https://github.com/example
|
18
|
+
keybase: https://keybase.io/example
|
19
|
+
medium: https://medium.com/@example
|
20
|
+
stack-overflow: https://stackoverflow.com/users/xxxxxx/example
|
21
|
+
|
22
|
+
plugins:
|
23
|
+
- jekyll-archives
|
24
|
+
- jekyll-redirect-from
|
25
|
+
- jekyll-sitemap
|
26
|
+
|
27
|
+
jekyll-archives:
|
28
|
+
enabled:
|
29
|
+
- tags
|
30
|
+
- categories
|
31
|
+
layout: category-posts
|
32
|
+
permalinks:
|
33
|
+
year: "/:year/"
|
34
|
+
month: "/:year/:month/"
|
35
|
+
day: "/:year/:month/:day/"
|
36
|
+
tag: "/tag/:name/"
|
37
|
+
category: "/category/:name/"
|
38
|
+
|
39
|
+
defaults:
|
40
|
+
- scope:
|
41
|
+
path: "assets/**"
|
42
|
+
values:
|
43
|
+
sitemap: false
|
44
|
+
|
45
|
+
# Excluded items can be processed by explicitly listing the directories or
|
46
|
+
# their entries' file path in the `include:` list.
|
47
|
+
exclude:
|
48
|
+
- .sass-cache/
|
49
|
+
- .jekyll-cache/
|
50
|
+
- gemfiles/
|
51
|
+
- Gemfile
|
52
|
+
- Gemfile.lock
|
53
|
+
- node_modules/
|
54
|
+
- vendor/bundle/
|
55
|
+
- vendor/cache/
|
56
|
+
- vendor/gems/
|
57
|
+
- vendor/ruby/
|
data/_data/navigation.yml
CHANGED
data/_includes/highlights.html
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
<table>
|
2
|
-
|
3
|
-
|
2
|
+
<!-- prettier-ignore -->
|
3
|
+
{% assign selection = site.posts | where_exp:"post", "post.highlight == true" %}
|
4
|
+
{% for post in selection %}
|
4
5
|
<tr>
|
5
6
|
<td>
|
6
7
|
<h4><span class="date">{{ post.date | date: "%b '%y"}}</span></h4>
|
7
8
|
</td>
|
8
9
|
<td>
|
9
|
-
{% if post.
|
10
|
+
{% if post.layout == 'post' and post.content.size > 1 %}
|
10
11
|
<a href="{{ post.url }}" style="text-decoration: none !important">
|
11
12
|
<h4> {{ post.title }}</h4>
|
12
13
|
</a>
|
@@ -6,7 +6,8 @@
|
|
6
6
|
{% assign nr_of_posts = 0 %}
|
7
7
|
{% assign cat = category | first %}
|
8
8
|
{% assign posts = site.categories[cat] %}
|
9
|
-
{% assign selection = posts | where_exp:"post", "post.
|
9
|
+
{% assign selection = posts | where_exp:"post", "post.layout == 'post'" %}
|
10
|
+
{% assign selection = selection | where_exp:"post", "post.content.size > 1" %}
|
10
11
|
{% for post in selection %}
|
11
12
|
{% assign nr_of_posts = nr_of_posts | plus:1 %}
|
12
13
|
{% endfor %}
|
@@ -30,7 +31,8 @@
|
|
30
31
|
{% assign nr_of_posts = 0 %}
|
31
32
|
{% assign tag = tag_post | first %}
|
32
33
|
{% assign tag_posts = site.tags[tag] %}
|
33
|
-
{% assign tag_posts_selection = tag_posts | where_exp:"post", "post.
|
34
|
+
{% assign tag_posts_selection = tag_posts | where_exp:"post", "post.layout == 'post'" %}
|
35
|
+
{% assign tag_posts_selection = tag_posts_selection | where_exp:"post", "post.content.size > 1" %}
|
34
36
|
{% for post in tag_posts_selection %}
|
35
37
|
{% assign nr_of_posts = nr_of_posts | plus:1 %}
|
36
38
|
{% endfor %}
|
@@ -6,11 +6,12 @@ title: categories
|
|
6
6
|
<div class="content">
|
7
7
|
<div class="posts-all">
|
8
8
|
<!-- prettier-ignore -->
|
9
|
-
{% assign selection = page.posts | where_exp:"post", "post.
|
10
|
-
|
11
|
-
{%
|
12
|
-
|
13
|
-
|
9
|
+
{% assign selection = page.posts | where_exp:"post", "post.layout == 'post'" %}
|
10
|
+
{% assign selection = selection | where_exp:"post", "post.content.size > 1" %}
|
11
|
+
{% for post in selection %}
|
12
|
+
{% include post-list-item.html %}
|
13
|
+
{% assign nr_of_posts = nr_of_posts | plus:1 %}
|
14
|
+
{% endfor %}
|
14
15
|
</div>
|
15
16
|
|
16
17
|
<div class="sidebar-short">
|
data/_layouts/home.html
ADDED
data/_layouts/index.html
CHANGED
@@ -6,13 +6,12 @@ title: home
|
|
6
6
|
<div class="content">
|
7
7
|
<div class="posts-top">
|
8
8
|
<!-- prettier-ignore -->
|
9
|
-
{% assign selection = site.posts | where_exp:"post", "post.list_post == true" %}
|
10
9
|
{% assign selection = site.posts | where_exp:"post", "post.short != true" %}
|
11
10
|
{% for post in selection limit: 5 %}
|
12
11
|
{% include post-list-item.html %}
|
13
12
|
{% endfor %}
|
14
13
|
<h2 style="font-family: 'Arvo'">
|
15
|
-
<a href="{{site.baseurl}}/posts
|
14
|
+
<a href="{{site.baseurl}}/posts/">❯ All posts </a>
|
16
15
|
</h2>
|
17
16
|
</div>
|
18
17
|
|
data/_layouts/page.html
ADDED
data/_layouts/posts.html
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
---
|
2
|
-
permalink: /posts.html
|
3
2
|
layout: default
|
3
|
+
permalink: /posts/
|
4
4
|
---
|
5
5
|
|
6
6
|
<div class="content">
|
7
7
|
<div class="posts-all">
|
8
8
|
<!-- prettier-ignore -->
|
9
|
-
{% assign selection = site.posts | where_exp:"post", "post.
|
10
|
-
{%
|
9
|
+
{% assign selection = site.posts | where_exp:"post", "post.layout == 'post'" %}
|
10
|
+
{% assign selection = selection | where_exp:"post", "post.content.size > 1" %}
|
11
|
+
{% for post in selection %}
|
11
12
|
{% include post-list-item.html %}
|
12
13
|
{% assign nr_of_posts = nr_of_posts | plus:1 %}
|
13
14
|
{% endfor %}
|
data/bin/install-theme
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-gh-pages-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LiveNL
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll-archives
|
@@ -55,12 +55,14 @@ dependencies:
|
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- simple-gh-pages-theme@jordiwippert.nl
|
58
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- install-theme
|
59
60
|
extensions: []
|
60
61
|
extra_rdoc_files: []
|
61
62
|
files:
|
62
63
|
- LICENSE.txt
|
63
64
|
- README.md
|
65
|
+
- _config.yml
|
64
66
|
- _data/navigation.yml
|
65
67
|
- _includes/highlights.html
|
66
68
|
- _includes/intro.html
|
@@ -72,11 +74,14 @@ files:
|
|
72
74
|
- _layouts/404.html
|
73
75
|
- _layouts/category-posts.html
|
74
76
|
- _layouts/default.html
|
77
|
+
- _layouts/home.html
|
75
78
|
- _layouts/index.html
|
79
|
+
- _layouts/page.html
|
76
80
|
- _layouts/post.html
|
77
81
|
- _layouts/posts.html
|
78
82
|
- _sass/main.scss
|
79
83
|
- assets/css/main.scss
|
84
|
+
- bin/install-theme
|
80
85
|
homepage: https://github.com/LiveNL/simple-gh-pages-theme
|
81
86
|
licenses:
|
82
87
|
- MIT
|