jekyll-ham 0.1.5 → 0.1.6

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: bf7ac09b46c599dd3e518debbea7d340a624d51de10411dc28ba2963097c2ebf
4
- data.tar.gz: 2c600aaa0f8363b1c7e81793e486a5575eda645db47db6e12719a175198ec042
3
+ metadata.gz: e6ee64820ffc3e1345253714f52732341c9278c0539aafb881a62de0ac60f8e1
4
+ data.tar.gz: b1317d0811c9f5ffc2823bd6f32d2e03dcce94406f4e1cfe49e87850c8f064e8
5
5
  SHA512:
6
- metadata.gz: 8f8d14e2e3438b31cfce961fac7fed16e8c63c1be8fd5534e679dfb7677a33ea3de3a4a041882f0537baede05a7dfaf30644ddb0ca8d56a7c5e66c42f00c645f
7
- data.tar.gz: 8dde903821c3a4e15ad413fbfe2dd2bb6a1111c7bbde741292a6624ea5a881ba2c821c1cbffc97bd9cc39ccd8ea5534736102b87089b2a5bea8e156ad161cd52
6
+ metadata.gz: 93b590f5b1679d396e6f4ed03b2ac9dc1b8f324e4220d8f643fb925a3927ccb6904a52fa380f84fa98843ad8944a8ca31b2a0572218e9b7c8d0a4596fb71fe85
7
+ data.tar.gz: 73a1dfd049c274726d4351feb2dc0358594d1d3d20c2acd3dd6c7bedf28a239d2bc31c7be702faff3e2aedffa270f1ae206f1d12b9d870d8ec158d2993840e4e
data/README.md CHANGED
@@ -85,7 +85,7 @@ gem "jekyll-ham", "~> 0.1.2"
85
85
  Also don't forget to change the `theme` configuration on your `_config.yml` to `jekyll-ham` instead of `minima`.
86
86
 
87
87
  ### Site does not load properly after first `jekyll build`?
88
- 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:
89
89
 
90
90
  ```yaml
91
91
  ---
@@ -93,7 +93,7 @@ layout: page
93
93
  ---
94
94
  ```
95
95
 
96
- 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.
97
97
 
98
98
  ### Changing the `_config.yml`
99
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
@@ -2,18 +2,20 @@
2
2
  {% if site.ham.contributing != null %}
3
3
  {% if site.ham.contributing.discuss.type != null && site.ham.contributing.discuss.type != 'url' %}
4
4
  <h5 id="discuss" class="sidebar-title">Discuss this page</h5>
5
- {% case site.ham.contributing.discuss.type %}
6
- {% when 'giscus' %}
7
- <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>
8
- {% when 'telegram' %}
9
- <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>
10
- {% when 'utteranc.es' %}
11
- <script src="https://utteranc.es/client.js" repo="{{ site.ham.contributing.discuss.repo }}" issue-term="{{ site.ham.contributing.discuss.issue_term }}"
12
- {% if site.ham.contributing.discuss.label != null %}
13
- label="{{ site.ham.contributing.discuss.label }}"
14
- {% endif %}
15
- theme="{{ site.ham.contributing.discuss.theme | default: 'preferred-color-scheme' }}" crossorigin="anonymous" async></script>
16
- {% endcase %}
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>
17
19
  {% endif %}
18
20
  {% endif %}
19
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>
@@ -33,4 +33,4 @@
33
33
  {% endif %}
34
34
  {% endif %}
35
35
  </div>
36
- </div>
36
+ </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>
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.5
4
+ version: 0.1.6
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-12-01 00:00:00.000000000 Z
11
+ date: 2021-12-08 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
@@ -161,6 +175,7 @@ files:
161
175
  - assets/halfmoon-variables.min.css
162
176
  - assets/halfmoon.min.js
163
177
  - assets/main.css
178
+ - assets/search.json
164
179
  - assets/simple-jekyll-search.min.js
165
180
  - assets/syntax-highlighter.css
166
181
  homepage: https://github.com/reinhart1010/ham