jekyll-ham 0.1.3 → 0.2.0

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: 46c514e70f5dcb6ad4c9c6d6b1f9e3cfd4a17d52ba637fb06ebd7c16ce00b6b2
4
- data.tar.gz: b58213fec13c4e37719cd7c8b1688c94053834406995929a2eddf5c0085756d8
3
+ metadata.gz: 25efbdc5f614e94b7027ebb7115268b62fb9a85fd59f61dbf36ad6f52dc8d373
4
+ data.tar.gz: 07e0dc8914bb3172786efcd17920bcc358f63a563295c093d6a4c2820ae16b4d
5
5
  SHA512:
6
- metadata.gz: 3d853b6f2e013655cc92f5301826a8340d136bf9d0a1a990f435f42286cb4d8dc766ca1f541daa6dbe75cac91cb3c17b451d5c1c94c5e389988abc1ffd52ceff
7
- data.tar.gz: 37bf21a9c4f03831ff721e0208c0a3799d6e119dd8c4e456c746e750594fb4a46ab628f05c865bff1d2ec66c324c167a98168cd69530d978aab201ec102a3fab
6
+ metadata.gz: '091bd4e837cab4a04b5533df895400742fcf797689fc39b5d87bddcd605816778d66542e780ce2f9d9f538e5223df21d8aaa8d94ee1de1c77c72ffcdb26a87b0'
7
+ data.tar.gz: 0f4956f720338fabcfbfb0e92b49dbb4dcdc2cce9f5495ce499cc6f879be41e694d5f2a95c58ada60480faa977719c7938e2abe214090b5fedb48efaf5b665c3
data/README.md CHANGED
@@ -58,7 +58,17 @@ HAM is short for:
58
58
  - [ ] Supporting Forem (DEV.to) liquid tags (YouTube embeds, Twitter posts, etc.)
59
59
 
60
60
  ## Usage
61
- **You don't need to clone this project to use HAM on your own wiki.** It's available as a [Gem-based theme](https://rubygems.org/gems/jekyll-ham) on the official Ruby gems repository. If you are unsure on installing gem-based themes like this one, check out the [official Jekyll documentation](https://jekyllrb.com/docs/themes/#installing-a-theme) for that.
61
+ ### For [GitHub Pages](https://pages.github.com)
62
+ If you would like to add this theme into your GitHub Pages website, please just add the following on your `_config.yml`
63
+
64
+ ```
65
+ remote_theme: reinhart1010/HAM
66
+ ```
67
+
68
+ The best part of this is that you can get the latest version of HAM without manually requiring it on your Gemfile, as long as you have updated your page frequently (GitHub will fetch the current available version of the HAM "theme").
69
+
70
+ ### As a Gem-based theme
71
+ HAM is also available as a [Gem-based theme](https://rubygems.org/gems/jekyll-ham) on the official Ruby gems repository. If you are unsure on installing gem-based themes like this one, check out the [official Jekyll documentation](https://jekyllrb.com/docs/themes/#installing-a-theme) for that.
62
72
 
63
73
  If you have just created a new site with `jekyll new <PATH>` chances are that you're using the default, Minima theme instead of HAM. If that's the case, replace the line which begins with
64
74
 
@@ -75,7 +85,7 @@ gem "jekyll-ham", "~> 0.1.2"
75
85
  Also don't forget to change the `theme` configuration on your `_config.yml` to `jekyll-ham` instead of `minima`.
76
86
 
77
87
  ### Site does not load properly after first `jekyll build`?
78
- Make sure that all of your Markdown and HTML files include the following frontmatter:
88
+ In previous versions of HAM (0.1.5 and earlier), all of your Markdown and HTML files must include the following frontmatter:
79
89
 
80
90
  ```yaml
81
91
  ---
@@ -83,7 +93,7 @@ layout: page
83
93
  ---
84
94
  ```
85
95
 
86
- This ensures that the default page template (as defined in our `_layouts/page.html`) is used to load the entire content
96
+ However, as of 0.1.6 `jekyll-optional-front-matter` has been included and configured by default to remove this requirement, which allows easier content migration for future wikis.
87
97
 
88
98
  ### Changing the `_config.yml`
89
99
  HAM also introduces additional configuration which you can set on your `_config.yml`:
data/_config.yml CHANGED
@@ -1,3 +1,8 @@
1
+ defaults:
2
+ - scope:
3
+ path: ""
4
+ values:
5
+ layout: "page"
1
6
  ham:
2
7
  site_icon: https://raw.githubusercontent.com/googlefonts/noto-emoji/main/svg/emoji_u1f969.svg
3
8
  highlighter: rouge
@@ -5,6 +10,7 @@ kramdown:
5
10
  input: GFM
6
11
  syntax_highlighter: rouge
7
12
  plugins:
13
+ - jekyll-optional-front-matter
8
14
  - jekyll-readme-index
9
15
  - jekyll-seo-tag
10
16
  - jekyll-sitemap
@@ -12,5 +18,6 @@ plugins:
12
18
  tagline: The truly static, Git-based wiki project
13
19
  title: HAM
14
20
  theme: jekyll-ham
21
+ url: ./
15
22
  readme_index:
16
23
  with_frontmatter: true
@@ -0,0 +1,21 @@
1
+ {% if site.ham.contributing != null %}
2
+ {% if site.ham.contributing != null %}
3
+ {% if site.ham.contributing.discuss.type != null && site.ham.contributing.discuss.type != 'url' %}
4
+ <h5 id="discuss" class="sidebar-title">Discuss this page</h5>
5
+ <div class="sidebar-title">
6
+ {% case site.ham.contributing.discuss.type %}
7
+ {% when 'giscus' %}
8
+ <script src="https://giscus.app/client.js" data-repo="{{ site.ham.contributing.discuss.repo }}" data-repo-id="{{ site.ham.contributing.discuss.repo_id }}" data-category="{{ site.ham.contributing.discuss.category }}" data-category-id="{{ site.ham.contributing.discuss.category_id }}" data-mapping="{{ site.ham.contributing.discuss.mapping }}" data-reactions-enabled="{{ site.ham.contributing.discuss.reactions_enabled | default: 1 }}" data-emit-metadata="{{ site.ham.contributing.discuss.emit_metadata | default: 0 }}" data-theme="{{ site.ham.contributing.discuss.theme | default: 'preferred_color_scheme' }}" data-lang="{{ site.ham.contributing.discuss.lang | default: 'en' }}" crossorigin="anonymous" async></script>
9
+ {% when 'telegram' %}
10
+ <script src="https://telegram.org/js/telegram-widget.js?15" {% if site.ham.contributing.discuss.telegram_discussion != null %} data-telegram-discussion="{{ site.ham.contributing.discuss.telegram_discussion }}" {% endif %} data-comments-limit="{{ site.ham.contributing.discuss.comments_limit | default: '5' }}" {% if site.ham.contributing.discuss.height != null %} data-height="{{ site.ham.contributing.discuss.height }}" {% endif %} data-color="{{ site.ham.contributing.discuss.color | default: '319BE6' }}" data-dark-color="{{ site.ham.contributing.discuss.color | default: '4BA3E2' }}" data-colorful="{{ site.ham.contributing.discuss.colorful | default: 0 }}" data-dark="{{ site.ham.contributing.discuss.dark | default: 0 }}" crossorigin="anonymous" async></script>
11
+ {% when 'utteranc.es' %}
12
+ <script src="https://utteranc.es/client.js" repo="{{ site.ham.contributing.discuss.repo }}" issue-term="{{ site.ham.contributing.discuss.issue_term }}"
13
+ {% if site.ham.contributing.discuss.label != null %}
14
+ label="{{ site.ham.contributing.discuss.label }}"
15
+ {% endif %}
16
+ theme="{{ site.ham.contributing.discuss.theme | default: 'preferred-color-scheme' }}" crossorigin="anonymous" async></script>
17
+ {% endcase %}
18
+ </div>
19
+ {% endif %}
20
+ {% endif %}
21
+ {% endif %}
@@ -1,4 +1,4 @@
1
- <div class="sidebar">
1
+ <aside class="sidebar">
2
2
  <div class="sidebar-menu">
3
3
  <h5 id="on-this-page" class="sidebar-title">On This Page</h5>
4
4
  <div class="sidebar-divider"></div>
@@ -31,6 +31,21 @@
31
31
  View Source
32
32
  </a>
33
33
  {% endif %}
34
+ <br>
35
+ {% endif %}
36
+ {% if site.data.index %}
37
+ {% for section in site.data.index %}
38
+ <h5 class="sidebar-title">
39
+ {{ section.name }}
40
+ </h5>
41
+ <div class="sidebar-divider"></div>
42
+ {% for child in section.children %}
43
+ <a href="{{ child.url }}" class="sidebar-link">
44
+ <span class="name">{{ child.name }}</span>
45
+ </a>
46
+ {% endfor %}
47
+ <br>
48
+ {% endfor %}
34
49
  {% endif %}
35
50
  </div>
36
- </div>
51
+ </aside>
@@ -17,8 +17,10 @@
17
17
  <!-- Bootstrap Icons CSS -->
18
18
  <link href="{{ site.url }}/assets/bootstrap-icons.min.css" rel="stylesheet" />
19
19
 
20
- <!-- Additional CSS -->
20
+ <!-- Core CSS required for HAM to work properly -->
21
21
  <link href="{{ site.url }}/assets/default.css" rel="stylesheet" />
22
+
23
+ <!-- Additional CSS -->
22
24
  <link href="{{ site.url }}/assets/main.css" rel="stylesheet" />
23
25
  <link href="{{ site.url }}/assets/syntax-highlighter.css" rel="stylesheet" />
24
26
 
@@ -43,7 +45,7 @@
43
45
  var sjs = SimpleJekyllSearch({
44
46
  searchInput: document.getElementById('search-input'),
45
47
  resultsContainer: document.getElementById('results-container'),
46
- json: '{{ site.url }}/search.json'
48
+ json: '{{ site.url }}/assets/search.json'
47
49
  })
48
50
  </script>
49
51
  <!-- Halfmoon JS -->
data/_layouts/page.html CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- <div class="row">
4
+ <article class="row">
5
5
  <div class="col-xl-8 p-20 collapse-group article-wrapper" id="_ham_content">
6
6
  {{ content }}
7
7
  </div>
@@ -27,6 +27,7 @@ layout: default
27
27
  {% include external-link.html %}
28
28
  {% endfor %}
29
29
  {% endif %}
30
+ {% include comments.html %}
30
31
  </div>
31
32
  </div>
32
33
 
data/assets/default.css CHANGED
@@ -1,17 +1,4 @@
1
- :root {
2
- --font-family-serif: 'Linux Libertine', 'Linux Libertine Display O', Georgia, 'Noto Serif', 'Times New Roman', Times, serif;
3
- --heading-font-weight: 700;
4
- }
5
-
6
- /* Use serif font for headings (a-la MediaWiki) */
7
- .article-wrapper h1, .article-wrapper h2, .content-wrapper .h1, .content-wrapper .h2 {
8
- font-family: var(--font-family-serif);
9
- font-weight: 400;
10
- }
11
- .article-sitesub {
12
- font-family: var(--font-family-serif);
13
- font-style: italic;
14
- }
1
+ @import url('custom.css');
15
2
 
16
3
  /* Lowers the font size for H3, H4, H5, H6 */
17
4
  .article-wrapper h3, .content-wrapper .h3 {
@@ -60,3 +47,7 @@
60
47
  .content-wrapper .highlighter-rouge {
61
48
  border-radius: var(--card-border-radius);
62
49
  }
50
+
51
+ article img {
52
+ max-width: 100%;
53
+ }
data/assets/main.css CHANGED
@@ -1 +1,15 @@
1
1
  /* TODO: Add your CSS here (Jekyll will override it) */
2
+ :root {
3
+ --font-family-serif: 'Linux Libertine', 'Linux Libertine Display O', Georgia, 'Noto Serif', 'Times New Roman', Times, serif;
4
+ --heading-font-weight: 700;
5
+ }
6
+
7
+ /* Use serif font for headings (a-la MediaWiki) */
8
+ .article-wrapper h1, .article-wrapper h2, .content-wrapper .h1, .content-wrapper .h2 {
9
+ font-family: var(--font-family-serif);
10
+ font-weight: 400;
11
+ }
12
+ .article-sitesub {
13
+ font-family: var(--font-family-serif);
14
+ font-style: italic;
15
+ }
@@ -0,0 +1,16 @@
1
+ ---
2
+ layout: none
3
+ ---
4
+ [
5
+ {% for page in site.pages %}
6
+ {
7
+ {% if page.url != '/assets/search.json' and page.url != '/sitemap.xml' and page.url != '/robots.txt' %}
8
+ "title" : "{% if page.url == '/' %}Main Page{% else %}{{ page.title | escape }}{% endif %}",
9
+ "category" : "{{ page.category }}",
10
+ "tags" : "{{ page.tags | join: ', ' }}",
11
+ "url" : "{{ site.baseurl }}{{ page.url }}",
12
+ "date" : "{{ page.date }}"
13
+ {% endif %}
14
+ } {% unless forloop.last %},{% endunless %}
15
+ {% endfor %}
16
+ ]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-ham
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reinhart Previano Koentjoro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-22 00:00:00.000000000 Z
11
+ date: 2022-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll-optional-front-matter
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.3.2
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: jekyll-readme-index
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -121,19 +135,19 @@ dependencies:
121
135
  - !ruby/object:Gem::Version
122
136
  version: 3.26.1
123
137
  - !ruby/object:Gem::Dependency
124
- name: wdm
138
+ name: listen
125
139
  requirement: !ruby/object:Gem::Requirement
126
140
  requirements:
127
- - - ">="
141
+ - - "~>"
128
142
  - !ruby/object:Gem::Version
129
- version: 0.1.0
143
+ version: '3.7'
130
144
  type: :runtime
131
145
  prerelease: false
132
146
  version_requirements: !ruby/object:Gem::Requirement
133
147
  requirements:
134
- - - ">="
148
+ - - "~>"
135
149
  - !ruby/object:Gem::Version
136
- version: 0.1.0
150
+ version: '3.7'
137
151
  description:
138
152
  email:
139
153
  - reinhart@reinhart1010.id
@@ -144,6 +158,7 @@ files:
144
158
  - LICENSE.txt
145
159
  - README.md
146
160
  - _config.yml
161
+ - _includes/comments.html
147
162
  - _includes/external-link.html
148
163
  - _includes/footer.html
149
164
  - _includes/navbar.html
@@ -160,6 +175,7 @@ files:
160
175
  - assets/halfmoon-variables.min.css
161
176
  - assets/halfmoon.min.js
162
177
  - assets/main.css
178
+ - assets/search.json
163
179
  - assets/simple-jekyll-search.min.js
164
180
  - assets/syntax-highlighter.css
165
181
  homepage: https://github.com/reinhart1010/ham