jekyll-theme-paperwiki 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c223657c7a92a92611c44734203824b2e0c0667db22f09a1ad966c9c981d9fe6
4
- data.tar.gz: 6d7dcbdd611f8f99c6a9cbf12042689b697382307cc157ceee4d901d79fc90c1
3
+ metadata.gz: 28a4abf525f90769aa5bb61af47acf4a3aa6b7d268769d82e39003d0f6d9ed27
4
+ data.tar.gz: 33cccefdaf9d5b6d3eb986b4e9dc2cfff92bf4e784cb3a973dd5bf46231ee56c
5
5
  SHA512:
6
- metadata.gz: 44aa2cd80d7c98f526f1e3fc7b87f09d41a75ff6c1778a37bdbfc5730d4edded5cae4dd0388561d34e4e53d887808c8591dd0716dc3bb13978c157015fd9ff9a
7
- data.tar.gz: 8f7a1712bc72299e0eb3d9b89795d6c04f32122d22eb8673d4d130076f4e16fd53b9c5e4292cd1ded8f8b99102db44b80ab26dcc68d05de2214f1a9af46cb738
6
+ metadata.gz: 43bd22b24f8f4df51d506376565f1ea679753586961eece2acf38cc3e4dce7c4a790514b967e0d474d61e39462db1ad64d012b3309ad173538e09b8640ec42d9
7
+ data.tar.gz: d0750463fd5edc0e41ffc25b32d3d8b00b393f9138f263bd0b20ba56a3a6c78194d62062af1f76ffc65eb0a3123444cf61cb50389be0ebe2632496fead1074bb
@@ -1,25 +1,36 @@
1
1
  <section class="collections-header">
2
2
 
3
3
  <section class="collections-stats">
4
- {% for item in site.data.projects %}
5
- {% if page.url contains item.link %}
6
- Total number of {{ item.name | downcase }} entries:
7
- <strong>{{ site.[page.project].size }}</strong>
8
- {% endif %}
9
- {% endfor %}
4
+ {% if site.multi_projects %}
5
+ {% for item in site.data.projects %}
6
+ {% if page.url contains item.link %}
7
+ Total number of {{ item.name | downcase }} entries:
8
+ <strong>{{ site.[page.project].size }}</strong>
9
+ {% endif %}
10
+ {% endfor %}
11
+ {% else %}
12
+ Total number of wiki entries:
13
+ <strong>{{ site.wiki.size }}</strong>
14
+ {% endif %}
10
15
  </section>
11
16
 
12
17
 
13
18
 
14
19
  <section class="collections-search">
15
20
 
16
- {% for item in site.data.projects %}
17
- {% if page.url contains item.link %}
18
- <form action="{{ item.link }}:search" method="GET">
19
- <input required type="search" class="collections-searchbar" placeholder="Search all {{ item.name | downcase }} entries" name="q">
20
- </form>
21
- {% endif %}
22
- {% endfor %}
21
+ {% if site.multi_projects %}
22
+ {% for item in site.data.projects %}
23
+ {% if page.url contains item.link %}
24
+ <form action="{{ item.link }}:search" method="GET">
25
+ <input required type="search" class="collections-searchbar" placeholder="Search all {{ item.name | downcase }} entries" name="q">
26
+ </form>
27
+ {% endif %}
28
+ {% endfor %}
29
+ {% else %}
30
+ <form action="wiki:search" method="GET">
31
+ <input required type="search" class="collections-searchbar" placeholder="Search all wiki entries" name="q">
32
+ </form>
33
+ {% endif %}
23
34
 
24
35
  </section>
25
36
 
@@ -1,15 +1,25 @@
1
1
  <nav class="collections-sidebar">
2
2
 
3
- {% for item in site.data.projects %}
4
- {% if page.url contains item.link %}
3
+ {% if site.multi_projects %}
4
+ {% for item in site.data.projects %}
5
+ {% if page.url contains item.link %}
6
+ <ul>
7
+ <li><a href="{{ item.link }}">Main page</a></li>
8
+ <li><a href="{{ item.link }}:contents">Contents</a></li>
9
+ <li><a href="{{ item.link }}:all">All entries</a></li>
10
+ <li><a href="{{ item.link }}:random">Random article</a></li>
11
+ <li><a href="{{ item.link }}:about">About</a></li>
12
+ </ul>
13
+ {% endif %}
14
+ {% endfor %}
15
+ {% else %}
5
16
  <ul>
6
- <li><a href="{{ item.link }}">Main page</a></li>
7
- <li><a href="{{ item.link }}:contents">Contents</a></li>
8
- <li><a href="{{ item.link }}:all">All entries</a></li>
9
- <li><a href="{{ item.link }}:random">Random article</a></li>
10
- <li><a href="{{ item.link }}:about">About</a></li>
17
+ <li><a href="/wiki">Main page</a></li>
18
+ <li><a href="/wiki:contents">Contents</a></li>
19
+ <li><a href="/wiki:all">All entries</a></li>
20
+ <li><a href="/wiki:random">Random article</a></li>
21
+ <li><a href="/wiki:about">About</a></li>
11
22
  </ul>
12
- {% endif %}
13
- {% endfor %}
23
+ {% endif %}
14
24
 
15
25
  </nav>
@@ -3,7 +3,11 @@
3
3
  <meta charset="utf-8">
4
4
 
5
5
  <title>
6
- {% if page.title %}{{ page.title }} | {{ site.title }}{% else %}{{ site.title }}{% endif %}
6
+ {% if page.title %}
7
+ {{ page.title }} | {{ site.title }}
8
+ {% else %}
9
+ {{ site.title }}
10
+ {% endif %}
7
11
  </title>
8
12
 
9
13
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -16,6 +16,7 @@
16
16
  {% endif %}
17
17
 
18
18
 
19
+
19
20
  {% if page.image %}
20
21
  <figure>
21
22
  <img src="{{ page.image }}" width=auto class="entry-image">
@@ -0,0 +1,43 @@
1
+ ---
2
+ # Jekyll page that redirects to a random page, post or document
3
+ # https://github.com/jekylltools/jekyll-random-redirect
4
+ # v1.6
5
+ layout: page
6
+ ---
7
+
8
+ {%- assign docs = site.posts -%}
9
+
10
+ {%- if site.random_redirect.pages == true -%}
11
+ {%- assign pages = site.documents | where_exp:"page","page.url != '/random/'" -%}
12
+ {%- assign docs = docs | concat: pages -%}
13
+ {%- endif -%}
14
+
15
+ {%- if site.random_redirect.documents == true -%}
16
+ {%- assign docs = docs | concat: site.documents | uniq -%}
17
+ {%- endif -%}
18
+
19
+ <script type="text/javascript">
20
+
21
+ var urls=[];
22
+
23
+ {% for doc in docs -%}
24
+ urls.push("{{ doc.url | absolute_url }}");
25
+ {% endfor -%}
26
+
27
+ var url = urls[Math.floor(Math.random()*urls.length)];
28
+
29
+ var link = document.createElement('link');
30
+ link.setAttribute('rel', 'canonical');
31
+ link.setAttribute('href', url);
32
+ document.head.appendChild(link);
33
+
34
+ if (typeof IE_fix != "undefined") {
35
+ document.write("Redirecting...");
36
+ var referLink = document.createElement("a");
37
+ referLink.href = url;
38
+ document.body.appendChild(referLink);
39
+ referLink.click();
40
+ } else {
41
+ window.location.replace(url);
42
+ }
43
+ </script>
data/_layouts/search.html CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  <h1>{{ page.title }}</h1>
6
6
 
7
- <dl id="search-results"></dl>
7
+ <dl id="search-results"></dl>
8
8
 
9
- {{ content }}
9
+ {{ content }}
10
10
 
11
11
  <script src="/assets/js/lunr.js"></script>
12
12
  <script src="/assets/js/search.js"></script>
@@ -0,0 +1,12 @@
1
+ ---
2
+ layout: search
3
+ ---
4
+
5
+ <script>
6
+ window.pages = {
7
+ {% for page in site.[page.project] %}
8
+ {% include search_results.html %}
9
+ {% unless forloop.last %},{% endunless %}
10
+ {% endfor %}
11
+ };
12
+ </script>
@@ -0,0 +1,19 @@
1
+ ---
2
+ layout: search
3
+ ---
4
+
5
+ <script>
6
+ window.pages = {
7
+ {% if site.multi_projects %}
8
+ {% for page in site.documents %}
9
+ {% include search_results.html %}
10
+ {% unless forloop.last %},{% endunless %}
11
+ {% endfor %}
12
+ {% else %}
13
+ {% for page in site.wiki %}
14
+ {% include search_results.html %}
15
+ {% unless forloop.last %},{% endunless %}
16
+ {% endfor %}
17
+ {% endif %}
18
+ };
19
+ </script>
data/_layouts/work.html CHANGED
@@ -4,7 +4,9 @@
4
4
 
5
5
  <article class="entry entry-work">
6
6
 
7
- <h1>{{ page.title }}</h1>
7
+ <h1>
8
+ {{ page.title }}
9
+ </h1>
8
10
 
9
11
  {{ content }}
10
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-paperwiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - pomeloshark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-14 00:00:00.000000000 Z
11
+ date: 2023-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
19
+ version: '4.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.2'
26
+ version: '4.3'
27
27
  description:
28
28
  email:
29
29
  executables: []
@@ -32,7 +32,6 @@ extra_rdoc_files: []
32
32
  files:
33
33
  - LICENSE.txt
34
34
  - README.md
35
- - _config.yml
36
35
  - _data/navigation.yml
37
36
  - _includes/collections_header.html
38
37
  - _includes/collections_sidebar.html
@@ -50,8 +49,11 @@ files:
50
49
  - _layouts/page.html
51
50
  - _layouts/portal.html
52
51
  - _layouts/post.html
52
+ - _layouts/random.html
53
53
  - _layouts/reference_desk.html
54
54
  - _layouts/search.html
55
+ - _layouts/search_collections.html
56
+ - _layouts/search_global.html
55
57
  - _layouts/wiki.html
56
58
  - _layouts/work.html
57
59
  - _plugins/blockquote.rb
data/_config.yml DELETED
@@ -1,65 +0,0 @@
1
- # Build settings
2
- include: ['_pages'] # forces custom pages to be organized into their own directory
3
-
4
- # Plugins
5
- # plugins:
6
- # - jekyll-ipa
7
-
8
- random_redirect:
9
- pages: true
10
-
11
- multi_projects: false
12
- entry_tags_top: true
13
-
14
-
15
-
16
- # Sets the collections directory and defines your collections.
17
- collections_dir: collections
18
- collections:
19
- wiki:
20
- output: true
21
- permalink: /:collection/:name
22
- works:
23
- output: true
24
- permalink: /:collection/:name
25
- grammars:
26
- output: true
27
- permalink: /:collection/:name
28
-
29
-
30
-
31
- # Front matter defaults, so you don't need to set layouts on every new page.
32
- # As long as pages are in the correct folder, they'll automatically have the
33
- # correct layout. You can override this via each page's front matter.
34
- defaults:
35
- -
36
- scope:
37
- path: "" # an empty string here means all files in the project
38
- type: "pages"
39
- values:
40
- layout: "page" # all pages will have the page.html layout unless overridden
41
- permalink: "/:path/:basename"
42
- -
43
- scope:
44
- path: "" # an empty string here means all files in the project
45
- type: "posts"
46
- values:
47
- layout: "post"
48
- -
49
- scope:
50
- path: "_wiki" # all pages in the wiki folder
51
- type: "wiki"
52
- values:
53
- layout: "wiki"
54
- -
55
- scope:
56
- path: "_works" # all pages in the works folder
57
- type: "works"
58
- values:
59
- layout: "work"
60
- -
61
- scope:
62
- path: "_grammars" # all pages in the grammars folder
63
- type: "grammars"
64
- values:
65
- layout: "grammar"