jekyll-theme-open-project 0.1.6 → 1.0.0.pre.pre
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 +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +101 -17
- data/_includes/home-hero.html +15 -2
- data/_includes/home-hub.html +71 -39
- data/_includes/home-project.html +1 -3
- data/_includes/index-page-hero.html +4 -2
- data/_includes/index-page-item-filter.html +28 -0
- data/_includes/nav-page-link.html +12 -1
- data/_includes/post-card.html +54 -7
- data/_includes/project-nav.html +0 -0
- data/_includes/software-card-hub.html +35 -0
- data/_layouts/blog-index.html +8 -6
- data/_layouts/default.html +14 -12
- data/_layouts/post.html +54 -2
- data/_layouts/project-index.html +46 -0
- data/_layouts/software-index.html +13 -14
- data/_layouts/spec-index.html +13 -14
- data/_sass/jekyll-theme-open-project.scss +206 -32
- data/_sass/open-project-base.scss +193 -6
- data/_sass/open-project-header-footer.scss +95 -35
- data/assets/img/external-link.svg +4 -0
- metadata +9 -5
- data/_layouts/index-page.html +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e3183b2c8b57bd349b4bf52814e6f82235e3ca6
|
4
|
+
data.tar.gz: 77fc79ad0e9588e6407d121c4abf0960d4be7e75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ea724c553743a8010118d1fb548a117a817af5a1a1dd29728938300eeb76c4a383eca37580426a334e3174cf55a814ed170032e93ff65441a681f9638431e3c
|
7
|
+
data.tar.gz: 3f662fd2af364a8548ce72ffde2f100fd57a5f24030a1a766377353a4224130aaab62be803933ca5098b0c738384146a619cc41eb4ef7fd7e60170935ebcd0a0
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -51,14 +51,18 @@ replacing default theme requirement:
|
|
51
51
|
gem 'jekyll-theme-open-project'
|
52
52
|
```
|
53
53
|
|
54
|
-
|
55
|
-
replacing default theme requirement:
|
54
|
+
(Jekyll’s default theme was “minima” at the time of this writing.)
|
56
55
|
|
57
|
-
|
58
|
-
|
59
|
-
```
|
56
|
+
Also in the `Gemfile`, add two important plugins to the `:jekyll_plugins` group.
|
57
|
+
(The SEO tag plugin is not mandatory, but these docs assume you use it.)
|
60
58
|
|
61
|
-
|
59
|
+
```ruby
|
60
|
+
group :jekyll_plugins do
|
61
|
+
gem "jekyll-seo-tag"
|
62
|
+
gem "jekyll-theme-open-project-helpers"
|
63
|
+
# ...other plugins, if you use any
|
64
|
+
end
|
65
|
+
```
|
62
66
|
|
63
67
|
Execute to install dependencies:
|
64
68
|
|
@@ -85,11 +89,12 @@ and it’ll use localhost.
|
|
85
89
|
|
86
90
|
## Universal setup
|
87
91
|
|
88
|
-
These are
|
92
|
+
These settings are required to both site types (hub and project).
|
89
93
|
|
90
94
|
- You may want to remove the default about.md page added by Jekyll,
|
91
95
|
as this theme does not account for its existence.
|
92
|
-
- Add following items to _config.yml
|
96
|
+
- Add following items to _config.yml
|
97
|
+
(don’t forget to remove default theme requirement):
|
93
98
|
|
94
99
|
```yaml
|
95
100
|
title: Site title
|
@@ -97,6 +102,22 @@ These are applicable to both site types (hub and project).
|
|
97
102
|
# The above two are used by jekyll-seo-tag for things such as
|
98
103
|
# `<title>` and `<meta>` tags, as well as elsewhere by the theme.
|
99
104
|
|
105
|
+
tagline: Site tagline
|
106
|
+
pitch: Site pitch
|
107
|
+
# The above two are used on home hero unit.
|
108
|
+
|
109
|
+
|
110
|
+
# Further settings are not expected to be changed,
|
111
|
+
# unless you know what you’re doing:
|
112
|
+
|
113
|
+
markdown: kramdown
|
114
|
+
theme: jekyll-theme-open-project
|
115
|
+
|
116
|
+
# Theme layouts can include from any directory, not just _includes.
|
117
|
+
# There’s a quirk in Jekyll’s “safe” behavior around include and gem-based themes
|
118
|
+
# which means include_relative wouldn’t cut it.
|
119
|
+
includes_dir: .
|
120
|
+
|
100
121
|
collections:
|
101
122
|
posts:
|
102
123
|
output: true
|
@@ -115,9 +136,6 @@ These are applicable to both site types (hub and project).
|
|
115
136
|
type: posts
|
116
137
|
values:
|
117
138
|
layout: post
|
118
|
-
|
119
|
-
plugins:
|
120
|
-
- jekyll-seo-tag
|
121
139
|
```
|
122
140
|
|
123
141
|
### Logo
|
@@ -153,6 +171,9 @@ You may want to supply _includes/legal.html with content like this:
|
|
153
171
|
|
154
172
|
Project sites and hub site can have a blog.
|
155
173
|
|
174
|
+
In case of the hub, blog index will show combined timeline
|
175
|
+
from hub blog and projects’ blogs.
|
176
|
+
|
156
177
|
#### Index
|
157
178
|
|
158
179
|
Create blog index page as _pages/blog.html, with nothing but frontmatter.
|
@@ -174,8 +195,26 @@ hero_include: index-page-hero.html
|
|
174
195
|
|
175
196
|
#### Posts
|
176
197
|
|
177
|
-
|
178
|
-
|
198
|
+
In general, posts are authored as per usual Jekyll setup.
|
199
|
+
|
200
|
+
The following _additional_ data is expected within post document frontmatter:
|
201
|
+
|
202
|
+
```yaml
|
203
|
+
---
|
204
|
+
author:
|
205
|
+
email: <author’s email>
|
206
|
+
name: <author’s full name>
|
207
|
+
social_links:
|
208
|
+
- https://twitter.com/username
|
209
|
+
- https://facebook.com/username
|
210
|
+
- https://linkedin.com/in/username
|
211
|
+
---
|
212
|
+
```
|
213
|
+
|
214
|
+
For hub-wide posts, put posts under _posts/ in site root and name files e.g.
|
215
|
+
`2018-04-20-welcome-to-jekyll.markdown` (no change from the usual Jekyll setup).
|
216
|
+
|
217
|
+
For project posts, see below about shared project data structure.
|
179
218
|
|
180
219
|
|
181
220
|
## Hub site
|
@@ -221,6 +260,23 @@ featured: true | false
|
|
221
260
|
home_url: <URL to standalone project site>
|
222
261
|
```
|
223
262
|
|
263
|
+
### Project index page
|
264
|
+
|
265
|
+
Create software index in _pages/projects.html, with nothing but frontmatter.
|
266
|
+
Use layout called "project-index", pass `hero_include: index-page-hero.html`,
|
267
|
+
and set `title` and `description` as appropriate.
|
268
|
+
|
269
|
+
Example:
|
270
|
+
|
271
|
+
```yaml
|
272
|
+
---
|
273
|
+
title: Open projects
|
274
|
+
description: Projecting goodness into the world!
|
275
|
+
layout: project-index
|
276
|
+
hero_include: index-page-hero.html
|
277
|
+
---
|
278
|
+
```
|
279
|
+
|
224
280
|
### Software index page
|
225
281
|
|
226
282
|
Create software index in _pages/software.html, with nothing but frontmatter.
|
@@ -294,7 +350,7 @@ defaults:
|
|
294
350
|
```
|
295
351
|
|
296
352
|
File layout is the same as described in the section
|
297
|
-
about shared project data structure, with _software
|
353
|
+
about shared project data structure, with _software, _specs, _posts directories
|
298
354
|
found in the root of your Jekyll site.
|
299
355
|
|
300
356
|
|
@@ -307,13 +363,26 @@ Following data structure is shared and used to describe projects,
|
|
307
363
|
whether on hub home site or each individual project site:
|
308
364
|
|
309
365
|
- <project-name>/
|
366
|
+
- _posts/
|
367
|
+
- 2038-02-31-blog-post-title.markdown
|
310
368
|
- _includes/
|
311
369
|
- symbol.svg
|
312
370
|
- _software/
|
313
|
-
- <name
|
371
|
+
- <name>/
|
372
|
+
- symbol.svg
|
373
|
+
- index.md
|
374
|
+
- _docs/
|
375
|
+
- <version>/
|
376
|
+
- overview.md
|
377
|
+
- <documentation-page-name>.md
|
314
378
|
- _specs/
|
315
379
|
- <name>.md
|
316
380
|
|
381
|
+
### Blog
|
382
|
+
|
383
|
+
Project blog posts should be authored as described in the universal setup
|
384
|
+
section.
|
385
|
+
|
317
386
|
### Software and specs
|
318
387
|
|
319
388
|
An open project serves as an umbrella for related
|
@@ -421,6 +490,10 @@ Commonly used layouts are:
|
|
421
490
|
|
422
491
|
- post: Blog post
|
423
492
|
|
493
|
+
- project-index: Open project index page (hub site only).
|
494
|
+
Suggested to supply hero_include.
|
495
|
+
Will show a list of open projects across the hub.
|
496
|
+
|
424
497
|
- software-index: Software index page (hub site only).
|
425
498
|
Suggested to supply hero_include.
|
426
499
|
Will show a list of software across projects within the hub.
|
@@ -456,8 +529,10 @@ under assets/css/style.scss with following exact contents:
|
|
456
529
|
@import '{{ site.theme }}';
|
457
530
|
```
|
458
531
|
|
459
|
-
|
460
|
-
|
532
|
+
There are two aspects to theme customization:
|
533
|
+
|
534
|
+
* Cutomize SASS variables before the import (such as colors)
|
535
|
+
* Define custom style rules after the import
|
461
536
|
|
462
537
|
### Custom rules
|
463
538
|
|
@@ -494,6 +569,15 @@ $accent-color: red !default;
|
|
494
569
|
# hero unit respectively. Gradients can be supplied.
|
495
570
|
$header-background: $primary-dark-color !default;
|
496
571
|
$hero-background: $primary-dark-color !default;
|
572
|
+
|
573
|
+
# Below customize colors for different sections of the site.
|
574
|
+
$hub-software--primary-color: lightsalmon !default;
|
575
|
+
$hub-software--primary-dark-color: tomato !default;
|
576
|
+
$hub-software--hero-background: $hub-software--primary-dark-color !default;
|
577
|
+
|
578
|
+
$hub-specs--primary-color: lightpink !default;
|
579
|
+
$hub-specs--primary-dark-color: palevioletred !default;
|
580
|
+
$hub-specs--hero-background: $hub-specs--primary-dark-color !default;
|
497
581
|
```
|
498
582
|
|
499
583
|
|
data/_includes/home-hero.html
CHANGED
@@ -1,2 +1,15 @@
|
|
1
|
-
<
|
2
|
-
<
|
1
|
+
<div role="presentation" class="text">
|
2
|
+
<h1 class="title">{{ site.tagline }}</h1>
|
3
|
+
<p class="desc">{{ site.pitch | safe }}</p>
|
4
|
+
<div class="cta explore-projects" role="presentation">
|
5
|
+
<a class="button" href="{{ "/projects/" | relative_url }}">
|
6
|
+
<i class="icon far fa-search"></i>
|
7
|
+
Explore Projects
|
8
|
+
</a>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<div role="presentation" class="illustration">
|
12
|
+
<div role="presentation" class="logo">
|
13
|
+
{% include symbol-hero.svg %}
|
14
|
+
</div>
|
15
|
+
</div>
|
data/_includes/home-hub.html
CHANGED
@@ -1,59 +1,91 @@
|
|
1
|
-
{% assign
|
2
|
-
{% assign num_featured_projects = featured_projects | size %}
|
3
|
-
{% if num_featured_projects > 0 %}
|
4
|
-
<section class="featured-projects">
|
5
|
-
<h2 class="title">Featured Projects</h2>
|
1
|
+
{% assign projects = site.projects | where_exp: "item", "item.home_url != nil" %}
|
6
2
|
|
7
|
-
|
3
|
+
<div class="underlay top-background" role="presentation">
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
|
5
|
+
<polygon fill="white" points="0,0 100,0 100,60 0,100"/>
|
6
|
+
</svg>
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
{% assign featured_projects = projects | where: "featured", true %}
|
9
|
+
{% assign num_featured_projects = featured_projects | size %}
|
10
|
+
{% if num_featured_projects > 0 %}
|
11
|
+
<section class="featured-projects">
|
12
|
+
<h2 class="title">Featured Projects</h2>
|
12
13
|
|
13
|
-
|
14
|
-
<div class="logo-container" role="presentation">
|
15
|
-
<div class="logo">{% include_relative {{ relative_symbol_path }} %}</div>
|
16
|
-
</div>
|
17
|
-
<h3 class="header">{{ item.title }}</h3>
|
18
|
-
<p class="body">
|
19
|
-
{{ item.description }}
|
20
|
-
</p>
|
21
|
-
</a>
|
22
|
-
{% endfor %}
|
23
|
-
</div>
|
24
|
-
</section>
|
25
|
-
{% endif %}
|
14
|
+
<div class="items" role="presentation">
|
26
15
|
|
27
|
-
{%
|
28
|
-
{%
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
16
|
+
{% for item in featured_projects limit:3 %}
|
17
|
+
{% assign symbol_path = item.path | split: "/" | slice: 0, 2 | join: "/" | append: "/_includes/symbol.svg" %}
|
18
|
+
{% assign relative_symbol_path = "/" | append: symbol_path %}
|
19
|
+
|
20
|
+
<a class="item" href="{{ item.home_url }}" role="article">
|
21
|
+
<header>
|
22
|
+
<div class="logo-container" role="presentation">
|
23
|
+
<div class="logo">{% include {{ relative_symbol_path }} %}</div>
|
24
|
+
</div>
|
25
|
+
<h3 class="title">{{ item.title }}</h3>
|
26
|
+
</header>
|
27
|
+
|
28
|
+
<p class="body">
|
29
|
+
{{ item.description }}
|
30
|
+
</p>
|
31
|
+
|
32
|
+
<div class="cta-view-project">
|
33
|
+
<div class="button">View Project</div>
|
34
|
+
</div>
|
35
|
+
</a>
|
36
|
+
{% endfor %}
|
37
|
+
</div>
|
38
|
+
</section>
|
39
|
+
{% endif %}
|
42
40
|
|
43
|
-
{% assign
|
41
|
+
{% assign num_featured_posts = site.posts | size %}
|
42
|
+
{% if num_featured_posts > 0 %}
|
43
|
+
<section class="featured-posts">
|
44
|
+
<div role="presentation" class="puny-label">Latest news</div>
|
45
|
+
<h2 class="title">From the Blog</h2>
|
46
|
+
|
47
|
+
<div class="items" role="presentation">
|
48
|
+
{% for item in site.posts limit:3 %}
|
49
|
+
{% include post-card.html post=item %}
|
50
|
+
{% endfor %}
|
51
|
+
</div>
|
52
|
+
</section>
|
53
|
+
{% endif %}
|
54
|
+
</div>
|
55
|
+
|
56
|
+
{% assign other_projects = projects | where: "featured", true %}
|
44
57
|
{% assign num_other_projects = other_projects | size %}
|
45
58
|
{% if num_other_projects > 0 %}
|
46
59
|
<section class="other-projects">
|
60
|
+
{% include symbol.svg %}
|
61
|
+
|
47
62
|
<h2 class="title">Other Projects</h2>
|
48
63
|
|
49
64
|
<div class="items {% if num_other_projects < 5 %}one-row{% endif %}"
|
50
65
|
role="presentation">
|
51
66
|
{% for item in other_projects %}
|
52
67
|
<a class="item" href="{{ item.home_url }}" role="article">
|
53
|
-
<
|
68
|
+
<header>
|
69
|
+
<div class="logo-container" role="presentation">
|
70
|
+
<div class="logo">{% include {{ relative_symbol_path }} %}</div>
|
71
|
+
</div>
|
72
|
+
<h3 class="title">{{ item.title }}</h3>
|
73
|
+
</header>
|
74
|
+
|
54
75
|
<p class="body">
|
55
76
|
{{ item.description }}
|
56
77
|
</p>
|
78
|
+
|
79
|
+
{% assign num_tags = item.tags | size %}
|
80
|
+
{% if num_tags > 0 %}
|
81
|
+
<footer class="meta">
|
82
|
+
<ul class="tags">
|
83
|
+
{% for tag in item.tags %}
|
84
|
+
<li>{{ tag }}</li>
|
85
|
+
{% endfor %}
|
86
|
+
</ul>
|
87
|
+
</footer>
|
88
|
+
{% endif %}
|
57
89
|
</a>
|
58
90
|
{% endfor %}
|
59
91
|
</div>
|
data/_includes/home-project.html
CHANGED
@@ -47,9 +47,7 @@
|
|
47
47
|
|
48
48
|
<div class="items" role="presentation">
|
49
49
|
{% for item in site.posts %}
|
50
|
-
|
51
|
-
{% include post-card.html %}
|
52
|
-
</a>
|
50
|
+
{% include post-card.html post=item %}
|
53
51
|
{% endfor %}
|
54
52
|
</div>
|
55
53
|
</section>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{% capture rawtags %}{% for doc in include.items %}{% for tag in doc.tags %}{{ tag }} {% endfor %}{% endfor %}{% endcapture %}
|
2
|
+
|
3
|
+
{% assign tags = rawtags | split: " " | uniq %}
|
4
|
+
{% assign num_tags = tags | size %}
|
5
|
+
|
6
|
+
{% if num_tags > 0 %}
|
7
|
+
<nav class="item-filter">
|
8
|
+
<ul class="tags">
|
9
|
+
<li>
|
10
|
+
{% if include.tag %}
|
11
|
+
<a href="{{ include.url_tag_prefix }}">All</a>
|
12
|
+
{% else %}
|
13
|
+
<span>All</span>
|
14
|
+
{% endif %}
|
15
|
+
</li>
|
16
|
+
|
17
|
+
{% for tag in tags %}
|
18
|
+
<li>
|
19
|
+
{% if tag == include.tag %}
|
20
|
+
<span>{{ tag }}</span>
|
21
|
+
{% else %}
|
22
|
+
<a href="{{ include.url_tag_prefix }}{{ tag }}">{{ tag }}</a>
|
23
|
+
{% endif %}
|
24
|
+
</li>
|
25
|
+
{% endfor %}
|
26
|
+
</ul>
|
27
|
+
</nav>
|
28
|
+
{% endif %}
|
@@ -1,5 +1,16 @@
|
|
1
|
-
{% if
|
1
|
+
{% if include.active_for_nested %}
|
2
|
+
{% assign first_component = page.url | split: '/' | slice: 0, 2 | join: '/' | append: '/' %}
|
3
|
+
{% if first_component == include.url %}
|
4
|
+
{% assign active_nested = true %}
|
5
|
+
{% else %}
|
6
|
+
{% assign active_nested = false %}
|
7
|
+
{% endif %}
|
8
|
+
{% endif %}
|
9
|
+
|
10
|
+
{% if active_nested or page.url == include.url %}
|
2
11
|
<span>{{ include.title }}</span>
|
3
12
|
{% else %}
|
4
13
|
<a href="{{ include.url }}">{{ include.title }}</a>
|
5
14
|
{% endif %}
|
15
|
+
|
16
|
+
{% assign active_nested = false %}
|