simple-gh-pages-theme 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -35
- data/_includes/navigation.html +6 -6
- data/bin/install-theme +58 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b44373a992017401fc4506c609fee23b0231a9de89aff5aed5d222d5e7fc0cba
|
4
|
+
data.tar.gz: 68ef089d1446713675933bc68e9ab52ca0604f442d9daba5c885f3960b79d5bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da5b2fa9992495f1fef392f35b6b5f1e600367b0c10f9c942b1228d13f33f0deb49009a9fb952d1154c27640192f1e473d4bceeb653c33a116ea1e19840fb8f7
|
7
|
+
data.tar.gz: 4013a523a0b55cfbd3307844abd4806eba63fef17927903494fee981c478a9363658f4e3c7bd840b0ec203b14766eaf056294f217dd5b1cc562fd6f6177f2560
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<table>
|
4
4
|
<tr><td>
|
5
|
-
<img width="500" alt="
|
5
|
+
<img width="500" alt="after installing the theme" src="https://user-images.githubusercontent.com/5443727/229901057-23be4caa-0c70-46c1-aa83-d60cbb1220ba.png">
|
6
6
|
</td><td>
|
7
7
|
<img width="500" alt="jordiwippert.nl" src="https://user-images.githubusercontent.com/5443727/229302812-d481eb40-b0ca-49cd-95d5-c7fef5228b7a.png">
|
8
8
|
</td>
|
@@ -17,66 +17,62 @@ in-use: https://jordiwippert.nl
|
|
17
17
|
</table>
|
18
18
|
|
19
19
|
## Quick installation
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
```shell
|
21
|
+
# 0. To create a new Jekyll site:
|
22
|
+
jekyll new <SITENAME>
|
23
|
+
cd <SITENAME>
|
24
|
+
```
|
23
25
|
```ruby
|
26
|
+
# 1. Add this line to your Jekyll site's `Gemfile`:
|
24
27
|
gem "simple-gh-pages-theme"
|
25
28
|
```
|
26
|
-
|
27
|
-
2. Add this line to your Jekyll site's `_config.yml`. Remove/disable possibly already enabled themes:
|
28
|
-
|
29
29
|
```yaml
|
30
|
+
# 2. Add this line to your Jekyll site's `_config.yml`. Remove/disable possibly already enabled themes:
|
30
31
|
theme: simple-gh-pages-theme
|
31
32
|
```
|
32
|
-
|
33
|
-
3. And then execute:
|
34
|
-
|
35
33
|
```shell
|
34
|
+
# 3. Execute on your command line:
|
36
35
|
bundle
|
37
|
-
```
|
38
36
|
|
39
|
-
4. Run install script to create 'posts.md'
|
40
|
-
|
41
|
-
```shell
|
37
|
+
# 4. Run install script to create 'posts.md'
|
42
38
|
bundle exec install-theme
|
43
|
-
```
|
44
39
|
|
45
|
-
5. When you now run your website locally on `http://localhost:4000`, it should show the theme:
|
46
|
-
|
47
|
-
```shell
|
40
|
+
# 5. When you now run your website locally on `http://localhost:4000`, it should show the theme:
|
48
41
|
bundle exec jekyll serve
|
49
42
|
```
|
50
43
|
|
51
44
|
## Configuration:
|
52
45
|
|
53
|
-
|
46
|
+
All configuration options that can be overwritten can be found [here](https://github.com/LiveNL/simple-gh-pages-theme/blob/main/_config.yml).
|
54
47
|
|
55
|
-
##
|
48
|
+
## Github Pages setup
|
56
49
|
|
57
|
-
|
58
|
-
|
59
|
-
|
50
|
+
Go to `settings` > `page` in your github-pages-repository.
|
51
|
+
1. Select source: `Deploy from a branch`
|
52
|
+
2. Select branch: `gh-pages` (create if non-existent)
|
53
|
+
3. Select `/docs` as folder
|
54
|
+
4. You can now run `script/deploy`
|
60
55
|
|
56
|
+
## Posts
|
57
|
+
Create your posts (files) like:
|
61
58
|
```
|
62
|
-
docs/_posts/
|
59
|
+
docs/_posts/yyyy-mm-dd-postname.md
|
63
60
|
```
|
64
61
|
|
65
|
-
Each post can have the following options (with
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
short: false (if true: it shown in 'short' list on home page)
|
62
|
+
Each post can have the following (metadata) options (with example values):
|
63
|
+
```yaml
|
64
|
+
layout: post # OR page
|
65
|
+
title: "Title here" # Used for post-titles
|
66
|
+
image: assets/images/image.png # OR images on urls like: https://example.com/image.png
|
67
|
+
categories: [category] # 'category' can be anything
|
68
|
+
tags: [tag] # 'tag' can be everything
|
69
|
+
highlight: false # if true: it will listed in highlights, which can be shown with: `{% include highlights.html %}`
|
70
|
+
short: false # if true: it shown in 'short' list on home page
|
75
71
|
```
|
76
72
|
|
77
73
|
## Contributing
|
78
74
|
|
79
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
75
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/LiveNL/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.
|
80
76
|
|
81
77
|
## License
|
82
78
|
|
data/_includes/navigation.html
CHANGED
@@ -7,12 +7,12 @@
|
|
7
7
|
{% endfor %}
|
8
8
|
<div class="social">
|
9
9
|
{% assign socials = site.about.socials %}
|
10
|
-
{% for
|
11
|
-
{%
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
{% for social in socials %}
|
11
|
+
{% assign social_type = social[0] %}
|
12
|
+
{% assign social_url = social[1] %}
|
13
|
+
<a target="_blank" href="{{social_url}}">
|
14
|
+
<i class="fa-brands fa-{{social_type}} text-muted" aria-hidden="true"></i>
|
15
|
+
</a>
|
16
16
|
{% endfor %}
|
17
17
|
<a href="mailto: {{site.about.email}}">
|
18
18
|
<i class="fa fa-envelope text-muted" aria-hidden="true"></i>
|
data/bin/install-theme
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
1
3
|
# Create 'posts.md'
|
2
4
|
File.write('posts.md', <<~HEREDOC
|
3
5
|
---
|
@@ -6,3 +8,59 @@ File.write('posts.md', <<~HEREDOC
|
|
6
8
|
---
|
7
9
|
HEREDOC
|
8
10
|
)
|
11
|
+
|
12
|
+
if !Dir.exist?("docs")
|
13
|
+
Dir.mkdir("docs")
|
14
|
+
end
|
15
|
+
|
16
|
+
Dir.glob("*").each do |file|
|
17
|
+
next if file == ".gitignore" || file == "docs"
|
18
|
+
if File.directory?(file)
|
19
|
+
FileUtils.mkdir_p("docs/#{file}")
|
20
|
+
FileUtils.cp_r("#{file}/.", "docs/#{file}/")
|
21
|
+
FileUtils.rm_rf(file)
|
22
|
+
else
|
23
|
+
FileUtils.mv(file, "docs/#{file}")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Create 'script/deploy'
|
28
|
+
if !Dir.exist?("script")
|
29
|
+
Dir.mkdir("script")
|
30
|
+
end
|
31
|
+
|
32
|
+
File.write('script/deploy', <<~HEREDOC
|
33
|
+
#!/bin/bash
|
34
|
+
|
35
|
+
MAIN_BRANCH="main"
|
36
|
+
DEPLOY_BRANCH="gh-pages"
|
37
|
+
|
38
|
+
# Clear files in deploy_branch
|
39
|
+
git checkout $DEPLOY_BRANCH
|
40
|
+
rm -r docs
|
41
|
+
|
42
|
+
# Get docs-files/folders from main_branch
|
43
|
+
git checkout $MAIN_BRANCH -- docs
|
44
|
+
cd docs || exit
|
45
|
+
|
46
|
+
# Build _site contents
|
47
|
+
bundle exec jekyll build
|
48
|
+
cd .. || exit
|
49
|
+
|
50
|
+
# Delete everything except for the docs/_site folder
|
51
|
+
find docs -mindepth 1 -maxdepth 1 ! -name '_site' -exec rm -r {} +
|
52
|
+
|
53
|
+
# Move all files in docs/_site to the docs folder
|
54
|
+
mv docs/_site/* docs
|
55
|
+
|
56
|
+
# Create commit with last message from main_branch and commit to deploy_branch
|
57
|
+
git add .
|
58
|
+
COMMIT_MESSAGE=$(git log $DEPLOY_BRANCH -1 --pretty="%h %s")
|
59
|
+
git commit -m "$COMMIT_MESSAGE"
|
60
|
+
git push origin $DEPLOY_BRANCH
|
61
|
+
git checkout $MAIN_BRANCH
|
62
|
+
HEREDOC
|
63
|
+
)
|
64
|
+
|
65
|
+
|
66
|
+
File.chmod(0777, "script/deploy")
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LiveNL
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll-archives
|
@@ -85,7 +85,8 @@ files:
|
|
85
85
|
homepage: https://github.com/LiveNL/simple-gh-pages-theme
|
86
86
|
licenses:
|
87
87
|
- MIT
|
88
|
-
metadata:
|
88
|
+
metadata:
|
89
|
+
github_repo: https://github.com/LiveNL/simple-gh-pages-theme
|
89
90
|
post_install_message:
|
90
91
|
rdoc_options: []
|
91
92
|
require_paths:
|
@@ -101,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
102
|
- !ruby/object:Gem::Version
|
102
103
|
version: '0'
|
103
104
|
requirements: []
|
104
|
-
rubygems_version: 3.4.
|
105
|
+
rubygems_version: 3.4.12
|
105
106
|
signing_key:
|
106
107
|
specification_version: 4
|
107
108
|
summary: This gem provides a simple GitHub pages theme
|