simple-gh-pages-theme 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ed0b3abadfdeb7321a6a2efaf687b91e36b5ce1161799c695f2b20246ee99d6
4
- data.tar.gz: 3814d56bf98da478731ed1d9fea3b9dd537ff178f731e9424a50c40220e67339
3
+ metadata.gz: 76f74777454e6c817541ffd856c597ceb29108fcfc2ca2e1ff8710929e5b12a8
4
+ data.tar.gz: f4bef2936b68df0052a2622e161eacfb0ae5e510eb2c37d1054bd9c4d097ec00
5
5
  SHA512:
6
- metadata.gz: 8775ea0c3b815ff9b9bfaade1ee8f493682f727ec7974b5c78797c12d3114b7475bb224e36e20bf5d355c0da94ca0d2c91252e7f1314ded89b1d565bf05dee5a
7
- data.tar.gz: d1e3e7b58deccf8cad9450589da09d4f54709a18b03e81ab5ae91781b8b3c79ccd7675204e66d0abb4c4f1f19002bade4da1396e39fc79de03352c6acd91f2e9
6
+ metadata.gz: cf6ba10ddddb570f4422e031bc33b48ce886e053c059d7375042a9c5c97a557ed32b6f81205b57cb015208b309c9ca2d0c7b07873479f357d0ca868bc0a9cc43
7
+ data.tar.gz: f3d8f92f9537a48deaff67323120ef1975e07b3c14bba368fd277d9f1142194f1da9767add52ba3ac1d812314818d22aeff59f0b3d3794c3b6fc37d774e398a6
data/README.md CHANGED
@@ -1,46 +1,56 @@
1
1
  # simple-gh-pages-theme
2
2
 
3
- ## Installation
4
-
5
- Add this line to your Jekyll site's `Gemfile`:
3
+ <table>
4
+ <tr><td>
5
+ <img width="500" alt="empty default" src="https://user-images.githubusercontent.com/5443727/229302809-750132e5-d461-4ec8-a38a-ccdc62b3b72e.png">
6
+ </td><td>
7
+ <img width="500" alt="jordiwippert.nl" src="https://user-images.githubusercontent.com/5443727/229302812-d481eb40-b0ca-49cd-95d5-c7fef5228b7a.png">
8
+ </td>
9
+ <tr>
10
+ <td>
11
+ simple-gh-pages-theme, after install and first post setup
12
+ </td>
13
+ <td>
14
+ in-use: https://jordiwippert.nl
15
+ </td>
16
+ </tr>
17
+ </table>
18
+
19
+ ## Quick installation
20
+
21
+ 1. Add this line to your Jekyll site's `Gemfile`:
6
22
 
7
23
  ```ruby
8
24
  gem "simple-gh-pages-theme"
9
25
  ```
10
26
 
11
- And add this line to your Jekyll site's `_config.yml`:
27
+ 2. Add this line to your Jekyll site's `_config.yml`. Remove/disable possibly already enabled themes:
12
28
 
13
29
  ```yaml
14
30
  theme: simple-gh-pages-theme
15
31
  ```
16
32
 
17
- And then execute:
18
-
19
- $ bundle
20
-
21
- Or install it yourself as:
33
+ 3. And then execute:
22
34
 
23
- $ gem install simple-gh-pages-theme
24
-
25
- ### !!! Important. To make the layouts work properly.
35
+ ```shell
36
+ bundle
37
+ ```
26
38
 
27
- If you created a new website (`jekyll new sitename`), you can make your pages use the layout by changing:
39
+ 4. Run install script to create 'posts.md'
28
40
 
29
- - **index.markdown**: to `layout: index`
30
- - **posts.markdown**: to `layout: posts` (file might not exist yet)
31
- - **404.markdown**: to `layout: 404` (file might not exist yet)
41
+ ```shell
42
+ bundle exec install-theme
43
+ ```
32
44
 
33
- Like:
45
+ 5. When you now run your website locally on `http://localhost:4000`, it should show the theme:
34
46
 
35
- ```
36
- ---
37
- layout: index
38
- ---
47
+ ```shell
48
+ bundle exec jekyll serve
39
49
  ```
40
50
 
41
51
  ## Configuration:
42
52
 
43
- See example config [here](https://github.com/LiveNL/simple-gh-pages-theme/blob/main/_config.yml)
53
+ See/use example config [here](https://github.com/LiveNL/simple-gh-pages-theme/blob/main/example-config.yml). Copy to `_config.yml`
44
54
 
45
55
  ## Usage
46
56
 
@@ -62,22 +72,12 @@ categories: [category]
62
72
  tags: [tag]
63
73
  highlight: false (if true: it will be used on about page, more here)
64
74
  short: false (if true: it shown in 'short' list on home page)
65
- list_post: false (if true: it shown in list on home/posts page)
66
75
  ```
67
76
 
68
77
  ## Contributing
69
78
 
70
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.
71
80
 
72
- ## Development
73
-
74
- To set up your environment to develop this theme, run `bundle install`.
75
-
76
- Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. 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.
77
-
78
- When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
79
- To add a custom directory to your theme-gem, please edit the regexp in `simple-gh-pages-theme.gemspec` accordingly.
80
-
81
81
  ## License
82
82
 
83
83
  The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/_config.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  theme: simple-gh-pages-theme
2
- title: My website
3
- description: The website description
2
+ title: "My website"
3
+ description: "The website description"
4
4
  domain: "username.github.io"
5
- baseurl: "https://example.com"
6
- url: "https://example.com"
7
- gtag: "G-XXXXXXXXX" (your google tag)
5
+ baseurl: ""
6
+ url: ""
7
+ gtag: "G-XXXXXXXXX" # (your google tag)
8
8
 
9
9
  about:
10
10
  name: Firstname Lastname
@@ -42,9 +42,6 @@ defaults:
42
42
  values:
43
43
  sitemap: false
44
44
 
45
- sass:
46
- sass_dir: _sass
47
-
48
45
  # Excluded items can be processed by explicitly listing the directories or
49
46
  # their entries' file path in the `include:` list.
50
47
  exclude:
data/_data/navigation.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  - name: Home
2
2
  link: /
3
3
  - name: Posts
4
- link: /posts.html
4
+ link: /posts/
5
5
  - name: About
6
- link: /about.html
6
+ link: /about/
@@ -1,12 +1,13 @@
1
1
  <table>
2
- {% assign selection = site.posts | where_exp:"post", "post.highlight == true"
3
- %} {% for post in selection %}
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.list_post == true %}
10
+ {% if post.layout == 'post' and post.content.size > 1 %}
10
11
  <a href="{{ post.url }}" style="text-decoration: none !important">
11
12
  <h4>&nbsp;{{ 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.list_post == true" %}
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.list_post == true" %}
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.list_post == true" %}
10
- {% for post in selection %}
11
- {% include post-list-item.html %}
12
- {% assign nr_of_posts = nr_of_posts | plus:1 %}
13
- {% endfor %}
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">
@@ -0,0 +1,4 @@
1
+ ---
2
+ layout: index
3
+ title: home
4
+ ---
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.html">&#10095;&nbsp; All posts </a>
14
+ <a href="{{site.baseurl}}/posts/">&#10095;&nbsp; All posts </a>
16
15
  </h2>
17
16
  </div>
18
17
 
@@ -0,0 +1,12 @@
1
+ ---
2
+ layout: default
3
+ title: page
4
+ ---
5
+
6
+ <div class="post-content" style="width: 100%">
7
+ <div class="div-post-title title">
8
+ {{ page.title }}
9
+ <div class="line"></div>
10
+ </div>
11
+ {{ content }}
12
+ </div>
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.list_post == true" %}
10
- {% for post in selection %}
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
@@ -0,0 +1,8 @@
1
+ # Create 'posts.md'
2
+ File.write('posts.md', <<~HEREDOC
3
+ ---
4
+ layout: posts
5
+ permalink: posts
6
+ ---
7
+ HEREDOC
8
+ )
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.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-01 00:00:00.000000000 Z
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,7 +55,8 @@ 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:
@@ -73,11 +74,14 @@ files:
73
74
  - _layouts/404.html
74
75
  - _layouts/category-posts.html
75
76
  - _layouts/default.html
77
+ - _layouts/home.html
76
78
  - _layouts/index.html
79
+ - _layouts/page.html
77
80
  - _layouts/post.html
78
81
  - _layouts/posts.html
79
82
  - _sass/main.scss
80
83
  - assets/css/main.scss
84
+ - bin/install-theme
81
85
  homepage: https://github.com/LiveNL/simple-gh-pages-theme
82
86
  licenses:
83
87
  - MIT