jekyll-theme-type 1.0 → 1.1

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
  SHA1:
3
- metadata.gz: 56cc45ff6a154eed2763e8083b1396fe147ba40f
4
- data.tar.gz: 3e8b739efcab4022186c0d236b32d02a7e026e78
3
+ metadata.gz: a887f9c28935122ea7323b0c1c6b3da01271e277
4
+ data.tar.gz: d3b5750a6bb40c7b9f0a2900e185176b18204331
5
5
  SHA512:
6
- metadata.gz: ec1641b4f379afefb5979d8b606d980c2c5b696c6b25ad28fc9dfc14a39cb0732b0efbebb03b5f0e8c2d9788e53a8661b3ccd1f37b7219f426e158ebb605c4d7
7
- data.tar.gz: 6ec5024b72857dffbffc0ff347382a622747fb1f720bbc88076147429f567631fba13cf8b6a039a281f61367bba7629235892c463bd4be2ead501319cda769f2
6
+ metadata.gz: 366a9adf069be4eb262ffe8b18a021fb909057335610978d35a2f67d7b0fd440e2974ce3960f58302c39f00840d77108db7c9ad9f7a5f91d21f4886a410f8d15
7
+ data.tar.gz: b46f93b306d3e5069a0f9f6a76e97b85468cb9700b03ec56c06570a6f83cb174985ea10620eb8b25064247d1a807bb8865df41a168842ac02fc1cb71c50cf772
data/README.md CHANGED
@@ -1,14 +1,220 @@
1
1
  # Type Theme
2
2
 
3
- ![Default Type Theme blog](https://cloud.githubusercontent.com/assets/816965/5142407/19742e48-71d6-11e4-8d9d-fdfe010784f0.png)
3
+ ![Default Type Theme blog](https://user-images.githubusercontent.com/816965/30518919-d5978024-9bcd-11e7-81b3-3dd07e99a1f9.png)
4
4
 
5
- A free and open-source [Jekyll](http://jekyllrb.com) theme. Great for blogs and easy to customize.
6
-
7
- ## Get Started
5
+ A free and open-source [Jekyll](https://jekyllrb.com) theme. Great for blogs and easy to customize.
8
6
 
9
7
  [Demo](https://rohanchandra.github.io/type-theme/)
10
8
 
11
- [Using Type](https://rohanchandra.github.io/project/type/)
9
+ ## Usage
10
+
11
+ 1. Fork and clone the [Type Theme repo](https://github.com/rohanchandra/type-theme): `git clone https://github.com/rohanchandra/type-theme`
12
+ 2. [Install Jekyll](https://jekyllrb.com/docs/installation/): `gem install jekyll`
13
+ 3. Install the theme's dependencies: `bundle install`
14
+ 4. Customize the theme (see below)
15
+ 5. Run the Jekyll server: `jekyll serve`
16
+
17
+ ## Customizing Type Theme
18
+
19
+ Open `_config.yml` in a text editor to change most of the blog's settings.
20
+
21
+ If a variable in this document is marked as "optional", disable the feature by removing all text from the variable. For example, to prevent the avatar from rendering in the header, the avatar line should read:
22
+
23
+ ```
24
+ theme:
25
+ title: Type Theme
26
+ avatar:
27
+ gravatar:
28
+ ```
29
+
30
+ Notice the avatar variable is left intentionally blank.
31
+
32
+ Below is a summary of the configuration options in Type Theme.
33
+
34
+ ### Site configuration
35
+ The most common configurations, included here for guidance, are:
36
+
37
+ Jekyll website *without* a subpath (such as a GitHub Pages website for a given username):
38
+
39
+ ```
40
+ # SITE CONFIGURATION
41
+ baseurl: ""
42
+ url: "https://username.github.io"
43
+ ```
44
+
45
+ Jekyll website *with* subpath (like the Type Theme demo page):
46
+
47
+ ```
48
+ # SITE CONFIGURATION
49
+ baseurl: "/sub-directory"
50
+ url: "https://username.github.io/"
51
+ ```
52
+
53
+ Please configure this in `_config.yml` before using the theme.
54
+
55
+ ### Meta
56
+
57
+ Meta variables hold basic information about your Jekyll site which will be used throughout the site and as meta properties for search engines, browsers, and the site's RSS feed.
58
+
59
+ Change these variables in `_config.yml`:
60
+
61
+ | Variable | Example | Description | Optional |
62
+ |-------------|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------|----------|
63
+ | title | My Jekyll Blog | Name of website | Yes |
64
+ | avatar | assets/img/avatar.png | Path of avatar image, to be displayed in the theme's header | Yes |
65
+ | gravatar | f9879d71855b5ff21e4963273a886bfc | [MD5 hash of your email address](https://secure.gravatar.com/site/implement/hash/) to load your Gravatar in the theme's header | Yes |
66
+ | description | My blog posts | Short description, primarily used by search engines | Yes |
67
+
68
+ ### Header and footer text
69
+
70
+ Change these variables in `_config.yml`:
71
+
72
+
73
+ | Variable | Example | Description | Optional |
74
+ |---------------------------|------------------------------|-------------------------------------------------------------------------|----------|
75
+ | header_text | Welcome to my Jekyll blog | HTML (shown below the navigation) with a background colour for emphasis | Yes |
76
+ | header_text_feature_image | assets/img/sample_feature_img_3.png | Background image for the header text | Yes |
77
+ | footer_text | Copyright 2014 | HTML (shown at end of the site) with lighter text | Yes |
78
+
79
+ ### Icons
80
+
81
+ Add your username on selected websites in the icon section of the `_config.yml` file to display the site's icon from [Font Awesome](https://fortawesome.github.io/Font-Awesome/) in the header navigation. All icon variables should be your username enclosed in quotes (e.g. "username"), except for the following variables:
82
+
83
+
84
+ | Variable | Example | Description | Optional |
85
+ |----------------|-------------------------------------------------|--------------------------------------------------------|----------|
86
+ | rss | true | Takes boolean value (true/false) to show RSS feed icon | Yes |
87
+ | email_address | type@example.com | Email address | Yes |
88
+ | linkedin | https://www.linkedin.com/in/FirstLast | Full URL to profile on LinkedIn | Yes |
89
+ | stack_exchange | https://stackoverflow.com/users/0000/first-last | Full URL to profile on Stack Exchange | Yes |
90
+
91
+ ### Scripts
92
+
93
+ Change these variables in `_config.yml`:
94
+
95
+
96
+ | Variable | Example | Description | Optional |
97
+ |------------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------|----------|
98
+ | google_analytics | UA-123456-01 | Google Analytics [tracking ID](https://support.google.com/analytics/answer/1032385?hl=en) | Yes |
99
+ | disqus_shortname | shortname | Disqus [shortname](https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname-) | Yes |
100
+ | katex | true | Takes boolean value (true/false) to conditionally load [KaTeX](https://khan.github.io/KaTeX/) scripts required for math typesetting | Yes |
101
+
102
+ Scripts listed here are only loaded if you provide a value in the `_config.yml` file.
103
+
104
+ ### Localization strings
105
+
106
+ Change localization string variables in `_config.yml`.
107
+
108
+ English text used in the theme (such as the "continue reading" label) has been grouped so you can quickly translate the theme or change labels to suit your needs.
109
+
110
+ ### Colours, typography, padding
111
+
112
+ ![A selection of colours set in Type Theme by modifying the CSS](https://cloud.githubusercontent.com/assets/816965/5142488/130869a6-71d7-11e4-8a38-a69ec1673436.png)
113
+
114
+
115
+ | Variable | Example | Description | Optional |
116
+ |--------------|----------------------------|--------------------------------------|--------------------------------------------------------------|
117
+ | google_fonts | "Playfair+Display:400,700\ | PT+Sans:400,700,700italic,400italic" | [Google Fonts](https://www.google.com/fonts) to load for use |
118
+
119
+ Navigate to the `_sass > base` directory and open `_variables.scss` to change colours, typography and padding used in the theme with CSS.
120
+
121
+ Once you have loaded a Google Font in `config.yml`, you can integrate the fonts into your CSS by changing the font-family in `_variables.scss`. For example, after loading the Playfair Display and PT Sans fonts from Google:
122
+
123
+ ```
124
+ // Typography
125
+ $font-family-main: 'PT Sans', Helvetica, Arial, sans-serif;
126
+ $font-family-headings: 'Playfair Display', Helvetica, Arial, sans-serif;
127
+ ```
128
+
129
+ Mozilla's [ColorPicker](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool) is a helpful tool to get your preferred colours in hexadecimal or RGBA form for use in `_variables.scss`.
130
+
131
+ ### Favicon
132
+
133
+ To change your favicon, usually displayed in the browser, place an ICO file named `favicon.ico` in the root directory of your blog.
134
+
135
+ ## Posts and pages in Type Theme
136
+ Please refer to the [Jekyll docs for writing posts](https://jekyllrb.com/docs/posts/). Non-standard features are documented below.
137
+
138
+ ### Math typesetting
139
+ Wrap math expressions with `$$` signs in your posts and make sure you have set the `katex` variable in `_config.yml` to `true` for math typesetting.
140
+
141
+ For inline math typesetting, type your math expression on the *same line* as your content. For example:
142
+
143
+ ```
144
+ Type math within a sentence $$2x^2 + x + c$$ to display inline
145
+ ```
146
+
147
+ For display math typesetting, type your math expression on a *new line*. For example:
148
+
149
+ ```
150
+ $$
151
+ \bar{y} = {1 \over n} \sum_{i = 1}^{n}y_i
152
+ $$
153
+ ```
154
+
155
+ Type Theme makes use for [KaTeX](https://khan.github.io/KaTeX/) for typesetting.
156
+
157
+ ### Feature images
158
+
159
+ ![Posts with geometric feature images](https://cloud.githubusercontent.com/assets/816965/5142406/19726478-71d6-11e4-8111-94f788b0e44d.png)
160
+
161
+ Add a feature image by specifying a path to an image in the [front matter](http://jekyllrb.com/docs/frontmatter/) in the form of `feature-img: "img/PATH_TO_IMAGE.png"`.
162
+
163
+ For example:
164
+
165
+ ```
166
+ ---
167
+ layout: post
168
+ title: Hello World
169
+ feature-img: "assets/img/sample_feature_img.png"
170
+ ---
171
+ ```
172
+
173
+ ### Hiding pages from navigation
174
+
175
+ In the Front Matter of a page, add `hide: true` to prevent the page from showing up in the header's navigation bar (visitors can still visit the URL through other means).
176
+
177
+ For example:
178
+
179
+ ```
180
+ ---
181
+ layout: page
182
+ title: "Error 404: Page not found"
183
+ permalink: /404.html
184
+ hide: true
185
+ ---
186
+ ```
187
+
188
+ ### Tags
189
+
190
+ Post tags should be placed between `[]` in your post metadata. Seperate each tag with a comma.
191
+
192
+ For example:
193
+
194
+ ```
195
+ ---
196
+ layout: post
197
+ title: Markdown and HTML
198
+ tags: [sample, markdown, html]
199
+ ---
200
+ ```
201
+
202
+ A tags listing will be automatically generated using the `tags.html` file provided in Type theme. If you're not using the tags feature it is safe to delete `tags.html`.
203
+
204
+ ### Subtitles
205
+ A subtitle can be displayed below your title on permalink post pages.
206
+
207
+ To enable this feature, add `subtitle` to your post metadata.
208
+
209
+ For example:
210
+
211
+ ```
212
+ ---
213
+ layout: post
214
+ title: "This is a title"
215
+ subtitle: "This is a subtitle"
216
+ ---
217
+ ```
12
218
 
13
219
  ## License
14
- The MIT License (MIT)
220
+ [The MIT License (MIT)](https://github.com/rohanchandra/type-theme/blob/master/LICENSE)
@@ -7,4 +7,4 @@
7
7
  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
8
8
  })();
9
9
  </script>
10
- <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
10
+ <noscript>{{ site.theme_settings.str_javascript_required_disqus }}</noscript>
@@ -3,7 +3,6 @@
3
3
  <title>{% if page.title %}{{ page.title }} |{% endif %} {{ site.theme_settings.title }}</title>
4
4
  <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.theme_settings.description }}{% endif %}">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <meta http-equiv="X-Frame-Options" content="sameorigin">
7
6
 
8
7
  <!-- CSS -->
9
8
  <link rel="stylesheet" href="{{ "/assets/css/main.css" | prepend: site.baseurl }}">
@@ -27,8 +26,8 @@
27
26
 
28
27
  <!-- KaTeX -->
29
28
  {% if site.theme_settings.katex %}
30
- <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css">
31
- <script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.js"></script>
29
+ <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.css">
30
+ <script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.js"></script>
32
31
  {% endif %}
33
32
 
34
33
  <!-- Google Analytics -->
@@ -6,7 +6,7 @@
6
6
  </a>
7
7
  {% elsif site.theme_settings.avatar %}
8
8
  <a href="{{ site.baseurl }}/">
9
- <img class="avatar" src="{{ site.baseurl }}/{{ site.theme_settings.avatar }}" alt="{{site.theme_settings.avatar}}"/>
9
+ <img class="avatar" src="{{ site.baseurl }}/{{ site.theme_settings.avatar }}" alt=""/>
10
10
  </a>
11
11
  {% endif %}
12
12
  <h1 class="site-title">
@@ -134,6 +134,14 @@
134
134
  </li>
135
135
  {% endif %}
136
136
 
137
+ {% if site.theme_settings.gitlab %}
138
+ <li>
139
+ <a href="https://gitlab.com/{{ site.theme_settings.gitlab }}" title="{{ site.theme_settings.str_follow_on }} Gitlab">
140
+ <i class="fa fa-fw fa-gitlab"></i>
141
+ </a>
142
+ </li>
143
+ {% endif %}
144
+
137
145
  {% if site.theme_settings.twitter %}
138
146
  <li>
139
147
  <a href="https://twitter.com/{{ site.theme_settings.twitter }}" title="{{ site.theme_settings.str_follow_on }} Twitter">
@@ -0,0 +1,18 @@
1
+ <div id="post-nav">
2
+ {% if page.previous.url %}
3
+ <div id="previous-post" class="post-nav-post">
4
+ <p>{{ site.theme_settings.str_previous_post }}</p>
5
+ <a href="{{ site.baseurl }}{{ page.previous.url }}">
6
+ {{ page.previous.title }}
7
+ </a>
8
+ </div>
9
+ {% endif %}
10
+ {% if page.next.url %}
11
+ <div id="next-post" class="post-nav-post">
12
+ <p>{{ site.theme_settings.str_next_post }}</p>
13
+ <a href="{{ site.baseurl }}{{ page.next.url }}">
14
+ {{ page.next.title }}
15
+ </a>
16
+ </div>
17
+ {% endif %}
18
+ </div>
@@ -0,0 +1,9 @@
1
+ {% if include.tag_count > 0 %}
2
+ <footer>
3
+ <div class="tags">
4
+ {% for tag in include.tags %}
5
+ <a class="tag" href="{{site.baseurl}}/tags#{{tag}}">#{{tag}}</a>
6
+ {% endfor %}
7
+ </div>
8
+ </footer>
9
+ {% endif %}
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
+
4
5
  <div class="home">
5
6
  {% if site.theme_settings.header_text %}
6
7
  <div class="call-out"
@@ -37,12 +38,12 @@ layout: default
37
38
  {% if paginator.previous_page %}
38
39
  <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="button" >
39
40
  <i class="fa fa-chevron-left"></i>
40
- {{ site.theme_settings.str_prev }}
41
+ {{ site.theme_settings.str_previous_page }}
41
42
  </a>
42
43
  {% endif %}
43
44
  {% if paginator.next_page %}
44
45
  <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="button" >
45
- {{ site.theme_settings.str_next }}
46
+ {{ site.theme_settings.str_next_page }}
46
47
  <i class="fa fa-chevron-right"></i>
47
48
  </a>
48
49
  {% endif %}
@@ -4,6 +4,7 @@ layout: default
4
4
  <article {% if page.feature-img %}class="feature-image"{% endif %}>
5
5
  <header style="background-image: url('{{ site.baseurl }}/{{ page.feature-img }}')">
6
6
  <h1 class="title">{{ page.title }}</h1>
7
+ {% if page.subtitle %}<h2 class="subtitle">{{ page.subtitle }}</h3>{% endif %}
7
8
  </header>
8
9
  <section class="post-content">{{ content }}</section>
9
10
  </article>
@@ -4,36 +4,16 @@ layout: default
4
4
  <article {% if page.feature-img %}class="feature-image"{% endif %}>
5
5
  <header style="background-image: url('{{ site.baseurl }}/{{ page.feature-img }}')">
6
6
  <h1 class="title">{{ page.title }}</h1>
7
+ {% if page.subtitle %}<h2 class="subtitle">{{ page.subtitle }}</h3>{% endif %}
7
8
  <p class="meta">
8
- {{ page.date | date: "%B %-d, %Y" }}
9
- {% if page.author %} - {{ page.author }}{% endif %}
9
+ {{ page.date | date: "%B %-d, %Y" }}
10
+ {% if page.author %} - {{ page.author }}{% endif %}
10
11
  </p>
11
12
  </header>
12
13
  <section class="post-content">{{ content }}</section>
14
+ {% include tags_list.html tags=page.tags tag_count=page.tags.size %}
13
15
  </article>
14
16
 
15
- <!-- Post navigation -->
16
- {% if site.theme_settings.post_navigation %}
17
- <div id="post-nav">
18
- {% if page.previous.url %}
19
- <a id="prev-post" href="{{ site.baseurl }}{{ page.previous.url }}">
20
- <span class="page-title">{{ page.previous.title }}</span>
21
- <span class="nav-label">
22
- <i class="fa fa-chevron-left"></i> {{ site.theme_settings.str_prev }}
23
- </span>
24
- </a>
25
- {% endif %}
26
- {% if page.next.url %}
27
- <a id="next-post" href="{{ site.baseurl }}{{ page.next.url }}">
28
- <span class="page-title">{{ page.next.title }}</span>
29
- <span class="nav-label">
30
- {{ site.theme_settings.str_next }} <i class="fa fa-chevron-right"></i>
31
- </span>
32
- </a>
33
- {% endif %}
34
- </div>
35
- {% endif %}
36
-
37
17
  <!-- Disqus -->
38
18
  {% if site.theme_settings.disqus_shortname %}
39
19
  <div class="comments">
@@ -41,9 +21,7 @@ layout: default
41
21
  </div>
42
22
  {% endif %}
43
23
 
44
- <!-- Muut -->
45
- {% if site.theme_settings.muut_community_name %}
46
- <div class="comments">
47
- {% include muut.html %}
48
- </div>
49
- {% endif %}
24
+ <!-- Post navigation -->
25
+ {% if site.theme_settings.post_navigation %}
26
+ {% include post_nav.html %}
27
+ {% endif %}
@@ -10,10 +10,9 @@
10
10
  @media (max-width: 1000px) {
11
11
  padding: $padding-small * 1.5 $padding-large / 1.6;
12
12
  }
13
- }
14
- %link-hover {
15
- text-decoration: underline;
16
- color: darken($link-color, 15%);
13
+ @media (max-width: 576px) {
14
+ padding: $padding-small;
15
+ }
17
16
  }
18
17
  // Buttons
19
18
  .button {
@@ -23,11 +22,22 @@
23
22
  margin: 1em 0;
24
23
  padding: 0.5em 0.75em;
25
24
  }
26
- a.button:hover {
27
- background: $link-color;
28
- border: 1px solid $link-color;
29
- color: $background-color;
30
- text-decoration: none;
25
+ a.button {
26
+ @extend .button-link;
27
+ }
28
+ .button-link {
29
+ &:hover {
30
+ background: $link-color;
31
+ border: 1px solid $link-color;
32
+ color: $background-color;
33
+ text-decoration: none;
34
+ }
35
+ }
36
+ .body-link {
37
+ &:hover {
38
+ text-decoration: underline;
39
+ color: darken($link-color, 15%);
40
+ }
31
41
  }
32
42
  // States
33
43
  .disabled {