taletype 0.1.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1ec5d20203e5f77694e336a2f0260f050ee3632e8213582201cb841225556671
4
+ data.tar.gz: b00eb38e5dc2c0ad98000f41262dd6c8bf28a1a63ee8f545e2c93aee5e782476
5
+ SHA512:
6
+ metadata.gz: c4fb23ddb319fcd2f00172e8f53e08e5b505452781baeb915fbf021aef6922dca9c8c22bccce42053e46252129fa6343d106e6cebd651cf09fa57c8a60bd19f4
7
+ data.tar.gz: 58faa2a81e590efc7c87e94e5efc1f54ed325a748de1308e0f51ef459eb8a981efdfe902359feb21667dab425f5c6a8cc335d816216260d37a5195d6ed8abea4
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Chester How
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,129 @@
1
+ # Tale
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/tale.svg)](https://badge.fury.io/rb/tale)
4
+
5
+ Tale is a minimal Jekyll theme curated for storytellers. Checkout the demo [here](https://chesterhow.github.io/tale/).
6
+
7
+ ![Tale screenshot](http://i.imgur.com/pXZrtmo.png)
8
+
9
+ ## Features
10
+ - Easy installation
11
+ - Compatible with GitHub Pages
12
+ - Responsive design (looks just as good on mobile)
13
+ - Syntax highlighting, with the help of Pygments
14
+ - Markdown and HTML text formatting
15
+ - Pagination of posts
16
+ - [Disqus comments (can be enabled if needed)](#enabling-comments)
17
+
18
+ ## Installation
19
+ There are 3 ways to install this theme
20
+
21
+ 1. Install it as a Ruby Gem (for self-hosted sites)
22
+ 2. Install it with the `jekyll-remote-theme` plugin (for GitHub Pages hosted sites)
23
+ 3. Fork the project directly
24
+
25
+ ### Ruby Gem method
26
+ 1. Add this line to your `Gemfile`:
27
+
28
+ ```ruby
29
+ gem "tale"
30
+ ```
31
+
32
+ 2. Install the theme's gems and dependencies:
33
+
34
+ ```bash
35
+ $ bundle
36
+ ```
37
+
38
+ 3. In `_config.yml` add these lines:
39
+
40
+ ```yaml
41
+ theme: tale
42
+
43
+ permalink: /:year-:month-:day/:title
44
+ paginate: 5
45
+ ```
46
+
47
+ Remove any other `theme:` lines.
48
+
49
+ 4. Rename `index.md` to `index.html`. Without this, the `jekyll-paginate` gem will not work.
50
+
51
+ 5. In `about.md`, change the `layout:` field to `post`:
52
+
53
+ ```Markdown
54
+ layout: post
55
+ ```
56
+
57
+ ### GitHub Pages method
58
+ 1. Add these 2 lines in to your `Gemfile`:
59
+
60
+ ```ruby
61
+ gem "jekyll-remote-theme"
62
+ gem "jekyll-paginate"
63
+ ```
64
+
65
+ 2. Install the newly added gems:
66
+
67
+ ```bash
68
+ $ bundle
69
+ ```
70
+
71
+ 3. In `_config.yml` add these lines:
72
+
73
+ ```yaml
74
+ remote_theme: chesterhow/tale
75
+
76
+ permalink: /:year-:month-:day/:title
77
+ paginate: 5
78
+
79
+ plugins:
80
+ - jekyll-paginate
81
+ - jekyll-remote-theme
82
+ ```
83
+
84
+ Remove any other `theme:` or `remote_theme:` lines.
85
+
86
+ 4. Rename `index.md` to `index.html`. Without this, the `jekyll-paginate` gem will not work.
87
+
88
+ 5. In `about.md`, change the `layout:` field to `post`:
89
+
90
+ ```Markdown
91
+ layout: post
92
+ ```
93
+
94
+ ### Fork method
95
+ 1. Fork this repository
96
+
97
+ 2. Delete the unnecessary files/folders: `CODE_OF_CONDUCT.md`, `LICENSE`, `README.md`, `tale.gemspec`
98
+
99
+ 3. Delete the `baseurl` line in `_config.yml`:
100
+
101
+ ```yaml
102
+ baseurl: "/tale" # delete this line
103
+ ```
104
+
105
+ ## Usage
106
+ Once you've installed the theme, you're ready to work on your Jekyll site. To start off, I would recommend updating `_config.yml` with your site's details.
107
+
108
+ To build and serve your site, run:
109
+
110
+ ```bash
111
+ $ bundle exec jekyll serve
112
+ ```
113
+
114
+ And you're all set! Head over to http://127.0.0.1:4000/ to see your site in action.
115
+
116
+ ### Enabling Comments
117
+ Comments are disabled by default. To enable them, look for the following line in `_config.yml` and change `jekyll-tale` to your site's Disqus id.
118
+
119
+ ```yml
120
+ disqus: jekyll-tale
121
+ ```
122
+
123
+ Next, add `comments: true` to the YAML front matter of the posts which you would like to enable comments for.
124
+
125
+ ## Contributing
126
+ Found a bug or have a suggestion? Feel free to create an issue or make a pull request!
127
+
128
+ ## License
129
+ See [LICENSE](https://github.com/chesterhow/tale/blob/master/LICENSE)
@@ -0,0 +1,6 @@
1
+ <script>
2
+ window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
3
+ ga('create', '{{ site.google_analytics }}', 'auto');
4
+ ga('send', 'pageview');
5
+ </script>
6
+ <script async src='https://www.google-analytics.com/analytics.js'></script>
@@ -0,0 +1,11 @@
1
+ <!-- Start disqus -->
2
+ <script src="{{ "/assets/js/disqusLoader.js" | relative_url }}" /></script>
3
+ <div id="disqus_thread"><h3>Discussion and feedback</h3></div>
4
+ <div class="disqus"></div>
5
+ <script>
6
+ disqusLoader('.disqus', {
7
+ scriptUrl: 'https://{{ site.disqus }}.disqus.com/embed.js'
8
+ });
9
+ </script>
10
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
11
+ <!-- End disqus -->
@@ -0,0 +1,6 @@
1
+ <footer>
2
+ <span>
3
+ &copy; <time>{{ site.time | date: '%Y' }}</time> {{ site.copyright }} {{ site.icp_info }} <br />
4
+ Made with Jekyll using the <a href="https://github.com/hutusi/tale/" target="_blank">TaleType</a> theme.
5
+ </span>
6
+ </footer>
@@ -0,0 +1,19 @@
1
+ <!-- Start gitalk -->
2
+ <script src="{{ "/assets/js/gitalk.min.js" | relative_url }}" /></script>
3
+ <div id="disqus_thread"><h3>Discussion and feedback</h3></div>
4
+ <div id="gitalk-container"></div>
5
+ <script>
6
+ const gitalk = new Gitalk({
7
+ clientID: '{{ site.gitalk.client_id }}',
8
+ clientSecret: '{{ site.gitalk.client_secret }}',
9
+ repo: '{{ site.gitalk.repo }}',
10
+ owner: '{{ site.gitalk.owner }}',
11
+ admin: '{{ site.gitalk.admin }}',
12
+ id: location.pathname, // Ensure uniqueness and length less than 50
13
+ distractionFreeMode: false // Facebook-like distraction free mode
14
+ })
15
+
16
+ gitalk.render('gitalk-container')
17
+ </script>
18
+ <noscript>Please enable JavaScript to view the <a href="https://gitalk.github.io/">comments powered by gitalk.</a></noscript>
19
+ <!-- End gitalk -->
@@ -0,0 +1,23 @@
1
+ <head>
2
+ <meta charset="UTF-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+
5
+ {% seo %}
6
+
7
+ <!-- CSS -->
8
+ <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
9
+ <!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700"> -->
10
+
11
+ <!-- Favicon -->
12
+ <link rel="icon" type="image/png" sizes="32x32" href="{{ "/assets/favicon-32x32.png" | relative_url }}">
13
+ <link rel="icon" type="image/png" sizes="16x16" href="{{ "/assets/favicon-16x16.png" | relative_url }}">
14
+ <link rel="apple-touch-icon" sizes="180x180" href="{{ "/assets/apple-touch-icon.png" | relative_url }}">
15
+
16
+ <!-- RSS -->
17
+ {% feed_meta %}
18
+
19
+ <!-- Google Analytics-->
20
+ {% if site.google_analytics and jekyll.environment == 'production' %}
21
+ {% include analytics.html %}
22
+ {% endif %}
23
+ </head>
@@ -0,0 +1,23 @@
1
+ <nav class="nav">
2
+ <div class="nav-container">
3
+ <a href="{{ site.baseurl }}/">
4
+ <h2 class="nav-title">{{ site.title }}</h2>
5
+ </a>
6
+
7
+ <ul>
8
+ {% for page in site.pages %}
9
+ {% unless page.name == '404.md' %}
10
+ {% if page.title %}
11
+ <li class='nav-item' role='presentation'>
12
+ <a class='nav-link' href='{{ page.url | prepend: site.baseurl }}'>{{ page.title }}</a>
13
+ </li>
14
+ {% endif %}
15
+ {% endunless %}
16
+ {% endfor %}
17
+
18
+ <li class='nav-item' role='presentation'>
19
+ <a class='nav-link' href='{{ site.baseurl }}/feed.xml' target='_blank'>Feed</a>
20
+ </li>
21
+ </ul>
22
+ </div>
23
+ </nav>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ {% include head.html %}
5
+
6
+ <body>
7
+
8
+ {% include navigation.html %}
9
+
10
+ <main>
11
+ {{ content }}
12
+ </main>
13
+
14
+ {% include footer.html %}
15
+ </body>
16
+ </html>
@@ -0,0 +1,31 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="catalogue">
6
+ {% for post in paginator.posts %}
7
+ <a href="{{ post.url | prepend: site.baseurl }}" class="catalogue-item">
8
+ <div>
9
+ <time datetime="{{ post.date }}" class="catalogue-time">{{ post.date | date: "%B %d, %Y" }}</time>
10
+ <h1 class="catalogue-title">{{ post.title }}</h1>
11
+ <div class="catalogue-line"></div>
12
+
13
+ <p>
14
+ {{ post.content | strip_html | strip_newlines | truncate: 95, "..." }}
15
+ </p>
16
+
17
+ </div>
18
+ </a>
19
+ {% endfor %}
20
+ </div>
21
+
22
+ <div class="pagination">
23
+ {% if paginator.previous_page %}
24
+ <a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="left arrow">&#8592;</a>
25
+ {% endif %}
26
+ {% if paginator.next_page %}
27
+ <a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="right arrow">&#8594;</a>
28
+ {% endif %}
29
+
30
+ <span>{{ paginator.page }}</span>
31
+ </div>
@@ -0,0 +1,25 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="post">
6
+ <h1 class="post-title">{{ page.title }}</h1>
7
+ <div class="post-line"></div>
8
+
9
+ {{ content }}
10
+ </div>
11
+
12
+ {% if page.comments %}
13
+ {% include disqus_comments.html %}
14
+ {% endif %}
15
+
16
+ <div class="pagination">
17
+ {% if page.next.url %}
18
+ <a href="{{ page.next.url | prepend: site.baseurl }}" class="left arrow">&#8592;</a>
19
+ {% endif %}
20
+ {% if page.previous.url %}
21
+ <a href="{{ page.previous.url | prepend: site.baseurl }}" class="right arrow">&#8594;</a>
22
+ {% endif %}
23
+
24
+ <a href="#" class="top">Top</a>
25
+ </div>
@@ -0,0 +1,39 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="post">
6
+ <h1 class="post-title">{{ page.title }}</h1>
7
+
8
+ <div class="post-info">
9
+ {% if page.date %}
10
+ <time datetime="{{ page.date }}">{{ page.date | date: "%B %d, %Y" }}</time>
11
+ {% endif %}
12
+ </div>
13
+
14
+ {{ content }}
15
+ </div>
16
+
17
+ <div class='tags'>
18
+ {% for tag in page.tags %}
19
+ <a href='{{ site.baseurl }}/tag/{{ tag }}'>{{ tag }}</a>
20
+ {% endfor %}
21
+ </div>
22
+
23
+ {% if site.comments_engine == 'disqus' %}
24
+ {% include disqus_comments.html %}
25
+ {% elsif site.comments_engine == 'gitalk' %}
26
+ {% include gitalk_comments.html %}
27
+ {% else %}
28
+ {% endif %}
29
+
30
+ <div class="pagination">
31
+ {% if page.next.url %}
32
+ <a href="{{ page.next.url | prepend: site.baseurl }}" class="left arrow">&#8592;</a>
33
+ {% endif %}
34
+ {% if page.previous.url %}
35
+ <a href="{{ page.previous.url | prepend: site.baseurl }}" class="right arrow">&#8594;</a>
36
+ {% endif %}
37
+
38
+ <a href="#" class="top">Top</a>
39
+ </div>
@@ -0,0 +1,16 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <h2>{{ page.tag }}</h2>
6
+ <ul>
7
+ {% for post in page.posts %}
8
+ <li><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.date | date_to_string }} | Tags: {{ post | tags }})</li>
9
+ {% endfor %}
10
+ </ul>
11
+
12
+ <h2>All tags</h2>
13
+
14
+ <div id="tag-cloud" class='tags'>
15
+ {{ site | tag_cloud }}
16
+ </div>
@@ -0,0 +1,12 @@
1
+ @import 'type/_all';
2
+
3
+ @import 'tale/variables';
4
+ @import 'tale/base';
5
+ @import 'tale/code';
6
+ @import 'tale/post';
7
+ @import 'tale/syntax';
8
+ @import 'tale/layout';
9
+ @import 'tale/pagination';
10
+ @import 'tale/catalogue';
11
+
12
+ @import 'vendor/gitalk';
@@ -0,0 +1,66 @@
1
+ * {
2
+ @include box-sizing;
3
+ line-height: 1.5;
4
+ }
5
+
6
+ html,
7
+ body {
8
+ color: $default-color;
9
+ margin: 0;
10
+ padding: 0;
11
+ }
12
+
13
+ html {
14
+ font-family: $serif-primary;
15
+ font-size: 14px;
16
+ overflow-y: scroll;
17
+
18
+ @media (min-width: 600px) {
19
+ font-size: 16px;
20
+ }
21
+ }
22
+
23
+ body {
24
+ -webkit-text-size-adjust: 100%;
25
+ }
26
+
27
+ h1,
28
+ h2,
29
+ h3,
30
+ h4,
31
+ h5,
32
+ h6 {
33
+ color: $default-shade;
34
+ font-family: $sans-serif;
35
+ line-height: normal;
36
+ }
37
+
38
+ a {
39
+ color: $blue;
40
+ text-decoration: none;
41
+ }
42
+
43
+ blockquote {
44
+ border-left: .25rem solid $grey-2;
45
+ color: $grey-1;
46
+ margin: .8rem 0;
47
+ padding: .5rem 1rem;
48
+
49
+ p:last-child {
50
+ margin-bottom: 0;
51
+ }
52
+
53
+ @media (min-width: 600px) {
54
+ padding: 0 5rem 0 1.25rem;
55
+ }
56
+ }
57
+
58
+ img {
59
+ display: block;
60
+ margin: 0 0 1rem;
61
+ max-width: 100%;
62
+ }
63
+
64
+ td {
65
+ vertical-align: top;
66
+ }