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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7b807d8c650f10418abcc0c706ffd1c650507409b2ef50a4a6f278333a22622
4
- data.tar.gz: 973d492bd1fa490a39071abfbc1bcbd1454caa6064be5f62194c99d3e8b84d9d
3
+ metadata.gz: 76f74777454e6c817541ffd856c597ceb29108fcfc2ca2e1ff8710929e5b12a8
4
+ data.tar.gz: f4bef2936b68df0052a2622e161eacfb0ae5e510eb2c37d1054bd9c4d097ec00
5
5
  SHA512:
6
- metadata.gz: 47549fede30cf7138a9393174e48757585a4d96d1fa79eee44ef12dfa30945cd028b1f95388e42861106d42238a6fe09c41ef25fcae0040af9deb9928c7f893d
7
- data.tar.gz: ce01829d02aa82aa0abc54af35291121ac55c47239824ade736ce189a75a480b5dc3a352a514ce98286f8895c7e72f3d5dbf9743f3fd5beee058439fbcc2eed8
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
- ## Installation
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
- And add this line to your Jekyll site's `_config.yml`. Remove/disable possibly already enabled themes:
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
- 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'
40
40
 
41
- - **index.markdown**:
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
- layout: 404
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
@@ -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.2
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,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