jekyll-theme-open-project 1.0.0.pre5 → 1.0.0.rc1

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: 830217c56e174364309376e273ab29de886a901b
4
- data.tar.gz: 8d47270e5806f166fef64b21aa6d2a3ade18e43f
3
+ metadata.gz: 647d305b57f26612c38e9645031e44ec088299bd
4
+ data.tar.gz: db3d4acc6db022fd3603a369ebb8c308b83f53a8
5
5
  SHA512:
6
- metadata.gz: a2380e7dd4f19ba47e6d03647a4f984e448cb01df45977499b145222794c6b71cbe4216a2524eabd97b2284f2c00c57c04da064702aa90649fd082ae1be98dc1
7
- data.tar.gz: 419ac314cd0a7508139005216978769b4dbae9187a0c42115628f94c3683064d855812ac46bfe4b98f0409b0919aecd7d181f9ead17daf724b96599a6f1e8657
6
+ metadata.gz: 43eee32912629f72edcd31e7c0305ed8f9425637eec1750e62313a91dda7fd270bab0cb30f957d03a57b0ab9d7ecc7aa723149a97c350d0ac5e50c7c3691935f
7
+ data.tar.gz: beceb6b03a3c8f4e2a57b922f0ba23fe34a7bc14cdeb2c89436737a6691d7eff8279ba0a370fb57faf9e008d02f93c9f29808e08c10a3eb402a5a6f05293708d
data/README.md CHANGED
@@ -12,7 +12,7 @@ to AWS S3.
12
12
 
13
13
  ## Contents
14
14
 
15
- * Creating a site: [quick-start](#starting-a-site-with-this-theme)
15
+ * Creating a site: [how to](#starting-a-site-with-this-theme)
16
16
 
17
17
  * [Universal site setup](#universal-setup)
18
18
  * [Hub site setup](#hub-site)
@@ -21,13 +21,14 @@ to AWS S3.
21
21
  * Describing open projects:
22
22
  [Project data structure](#describing-a-project-shared-data-structure)
23
23
 
24
- * Customizing site looks without violating theme design constraints:
24
+ * Customizing site looks:
25
25
 
26
26
  * [Style customization](#style-customization)
27
27
  * [SVG guidelines](#svg-guidelines)
28
28
  * [Content guidelines](#content-guidelines)
29
29
 
30
30
  * [Select layout reference](#select-layout-reference)
31
+ * [Implementation gotchas](#gotchas)
31
32
 
32
33
 
33
34
  ## Starting a site with this theme
@@ -75,10 +76,10 @@ Execute the following to install dependencies:
75
76
  ### Configuring site
76
77
 
77
78
  Edit _config.yml to add necessary site-wide configuration options,
78
- and add necessary files and folders to site contents. This step depends
79
- on the type of site you’re creating: open hub or individual open project site.
79
+ and add files and folders to site contents. This step depends
80
+ on the type of site you’re creating: hub or individual project site.
80
81
 
81
- Below sections explain core concepts of open project and hub, and go
82
+ Further sections explain core concepts of open project and hub, and go
82
83
  into detail about how to configure a project or hub site.
83
84
 
84
85
  ### Building site
@@ -87,19 +88,22 @@ Execute to build the site locally and watch for changes:
87
88
 
88
89
  $ bundle exec jekyll serve --host mysite.local --port 4000
89
90
 
90
- This assumes you have mysite.local mapped, otherwise omit --host
91
- and it’ll use localhost.
91
+ This assumes you have mysite.local mapped in your hosts file,
92
+ otherwise omit --host and it’ll use localhost” as domain name.
92
93
 
93
94
 
94
95
  ## Universal setup
95
96
 
96
- These settings are required to both site types (hub and project).
97
+ These settings apply to both site types (hub and project).
97
98
 
98
99
  - You may want to remove the default about.md page added by Jekyll,
99
100
  as this theme does not account for its existence.
100
- - Add `hero_include: home-hero.html` to YAML frontmatter in `index.md`.
101
- - Add following items to _config.yml
102
- (don’t forget to remove default theme requirement):
101
+
102
+ - Add `hero_include: home-hero.html` to YAML frontmatter
103
+ in your main `index.md`.
104
+
105
+ - Add following items to site’s _config.yml
106
+ (and don’t forget to remove default theme requirement there):
103
107
 
104
108
  ```yaml
105
109
  title: Site title
@@ -111,44 +115,49 @@ These settings are required to both site types (hub and project).
111
115
  pitch: Site pitch
112
116
  # The above two are used on home hero unit.
113
117
 
114
- permalink: /blog/:month-:day-:year/:title/
115
-
116
- theme: jekyll-theme-open-project
118
+ seo:
119
+ type: Organization
117
120
 
118
121
  social:
119
122
  links:
120
123
  - https://twitter.com/<orgname>
121
124
  - https://github.com/<orgname>
125
+
126
+ legal:
127
+ name: Full Organization Name
128
+ tos_link: https://www.example.com/tos
129
+ privacy_policy_link: https://www.example.com/privacy
130
+
131
+ # These are required for the theme to work:
132
+
133
+ theme: jekyll-theme-open-project
134
+ permalink: /blog/:month-:day-:year/:title/
122
135
  ```
123
136
 
124
137
  ### Logo
125
138
 
126
- Logo consists of a symbol and site name.
139
+ By “logo” is meant the combination of site symbol as a graphic
140
+ and name as word(s).
127
141
 
128
- **Symbol** is basically an icon for the site.
129
- Should look OK in dimensions of 30x30px, and fit inside a square.
130
- Should be in SVG format (see also the SVG guidelines section).
131
- Place the symbol in _includes/symbol.svg.
132
-
133
- **Site name** displayed to the right of the symbol.
134
- Limit the name to 1-3 words.
135
- By default, the title you define in site config is used (for project site,
136
- it is the name of the project).
137
- Alternatively, you can place site name in _includes/title.html with custom HTML
138
- or SVG. (In that case it must look good when placed in a 30px tall container,
139
- and in case of SVG same SVG guidelines apply).
140
-
141
- ### Legal small text
142
-
143
- You may want to supply _includes/legal.html with content like this:
144
-
145
- ```html
146
- <span class="copyright">Copyright © 2018 MyCompany. All rights reserved.</span>
147
- <nav>
148
- <a href="https://www.example.com/tos">Terms</a>
149
- <a href="https://www.example.com/privacy">Privacy</a>
150
- </nav>
151
- ```
142
+ - **Symbol** is basically an icon for the site.
143
+ Should look OK in dimensions of 30x30px, and fit inside a square.
144
+ Should be in SVG format (see also the SVG guidelines section).
145
+
146
+ Drop your site-wide symbol in <site root>/assets/symbol.svg.
147
+
148
+ - **Site name** displayed to the right of the symbol.
149
+ Limit the name to 1-3 words.
150
+
151
+ Drop a file called `title.html` in the root of your site.
152
+ In its contents you can go as simple as `{{ site.name }}`
153
+ and as complex as a custom SVG shape.
154
+
155
+ Note that it must look good when placed inside ~30px tall container.
156
+ In case of SVG, SVG guidelines apply.
157
+
158
+ Do not create custom CSS rules for .site-logo descendants:
159
+ this may cause issues when one site’s logo is used in context of another site
160
+ of the same hub. You can use inline styling, though.
152
161
 
153
162
  ### Blog
154
163
 
@@ -303,8 +312,8 @@ author: "Company or Individual Name Goes Here"
303
312
  ```
304
313
 
305
314
  File layout is the same as described in the section
306
- about shared project data structure, with _software, _specs, _posts, _includes
307
- directories found in the root of your Jekyll site.
315
+ about shared project data structure, with _software, _specs, _posts, assets
316
+ subdirectories found in the root of your Jekyll site.
308
317
 
309
318
 
310
319
  ## Describing a project: shared data structure
@@ -318,12 +327,12 @@ whether on hub home site or each individual project site:
318
327
  - <project-name>/
319
328
  - _posts/
320
329
  - 2038-02-31-blog-post-title.markdown
321
- - _includes/
330
+ - assets/
322
331
  - symbol.svg
323
332
  - _software/
324
333
  - <name>.md
325
334
  - <name>/
326
- - _includes/
335
+ - assets/
327
336
  - symbol.svg
328
337
  - _specs/
329
338
  - <name>.md
@@ -342,7 +351,7 @@ placed under _software/ or _specs/ subdirectory, respectively,
342
351
  of your open project’s Jekyll site.
343
352
 
344
353
  A software product additionally is required to have a symbol in SVG format,
345
- placed in <name>/_includes/symbol.svg under _software/ directory.
354
+ placed in <name>/assets/symbol.svg within _software/ directory.
346
355
 
347
356
  YAML frontmatter that is expected with both software and specs:
348
357
 
@@ -416,9 +425,9 @@ that are hosted under that project site.
416
425
 
417
426
  ### Symbol
418
427
 
419
- Should look OK in dimensions of 30x30px, and fit inside a square.
428
+ Should look OK in dimensions of about 30x30, 60x60px. Must fit in a square.
420
429
  Should be in SVG format (see also the SVG guidelines section).
421
- Place the symbol in _includes/symbol.svg within project directory.
430
+ Place the symbol in assets/symbol.svg within project directory.
422
431
 
423
432
 
424
433
  ## SVG guidelines
@@ -439,7 +448,29 @@ Place the symbol in _includes/symbol.svg within project directory.
439
448
  - Blog post excerpt: about 20–24 words, no markup
440
449
 
441
450
 
442
- ## Select layout reference
451
+ ## Theme includes
452
+
453
+ Commonly used overridable includes are (paths relative to your site root):
454
+
455
+ - title.html: Site name in case you want to provide custom typography,
456
+ possibly as SVG.
457
+
458
+ - project-nav.html (currently project sites only): Additional
459
+ links in project site’s top navigation, if needed.
460
+
461
+ - assets/symbol.svg: Site-wide symbol is used as an include
462
+ to facilitate path fill color overrides via CSS rules.
463
+
464
+ ### Include location gotcha
465
+
466
+ Theme configuration adds `includes_dir: .` to your site.
467
+ This means when Jekyll encounters `{% include <include_name> %}`
468
+ in a template, it looks first in `<site root>/<include_name>`,
469
+ and then in `<theme root>/_includes/<include_name>`. Consequently,
470
+ you put your include overrides directly in site root, **not** inside
471
+ `_includes/` directory of your side.
472
+
473
+ ## Theme layouts
443
474
 
444
475
  Normally you don’t need to specify layouts manually, except where
445
476
  instructed in site setup sections of this document.
@@ -1,16 +1,30 @@
1
1
  <div role="presentation" class="text">
2
2
  <h1 class="title">{{ site.tagline }}</h1>
3
3
  <p class="desc">{{ site.pitch | safe }}</p>
4
- <div class="cta explore-projects" role="presentation">
4
+
5
+ <div class="cta" role="presentation">
5
6
  {% if site.is_hub %}
6
7
  <a class="button" href="{{ "/projects/" | relative_url }}">
7
8
  <i class="icon far fa-search"></i>
8
9
  Explore Projects
9
10
  </a>
10
11
  {% else if %}
11
- <a class="button" href="{{ site.get_started_url | relative_url }}">
12
- Get Started
13
- </a>
12
+ {% assign ctas = site.home_calls_to_action | slice: 0, 2 %}
13
+
14
+ {% for link in ctas %}
15
+ <a class="button" href="{{ link.url | relative_url }}">
16
+ {{ link.title }}
17
+ </a>
18
+ {% endfor %}
14
19
  {% endif %}
15
20
  </div>
21
+
22
+ {% if site.parent_hub %}
23
+ <div class="parent-hub-plug" role="presentation">
24
+ <span class="title">A project done by</span>
25
+ <div class="logo" role="presentation">
26
+ {% include parent-hub/assets/symbol.svg %}&nbsp;<span class="title">{% include parent-hub/assets/title.html %}</span>
27
+ </div>
28
+ </div>
29
+ {% endif %}
16
30
  </div>
@@ -14,13 +14,12 @@
14
14
  <div class="items" role="presentation">
15
15
 
16
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
17
  <a class="item" href="{{ item.home_url }}" role="article">
21
18
  <header>
22
19
  <div class="logo-container" role="presentation">
23
- <div class="logo">{% include {{ relative_symbol_path }} %}</div>
20
+ {% assign symbol_path = item.path | split: "/" | slice: 1, 1 | join: "/" | append: "/assets/symbol.svg" %}
21
+ {% assign relative_symbol_path = "/projects/" | append: symbol_path %}
22
+ <div class="logo"><img src="{{ relative_symbol_path }}"></div>
24
23
  </div>
25
24
  <h3 class="title">{{ item.title }}</h3>
26
25
  </header>
@@ -57,7 +56,7 @@
57
56
  {% assign num_other_projects = other_projects | size %}
58
57
  {% if num_other_projects > 0 %}
59
58
  <section class="other-projects">
60
- {% include _includes/symbol.svg %}
59
+ {% include assets/symbol.svg %}
61
60
 
62
61
  <h2 class="title">Other Projects</h2>
63
62
 
@@ -67,7 +66,9 @@
67
66
  <a class="item" href="{{ item.home_url }}" role="article">
68
67
  <header>
69
68
  <div class="logo-container" role="presentation">
70
- <div class="logo">{% include {{ relative_symbol_path }} %}</div>
69
+ {% assign symbol_path = item.path | split: "/" | slice: 1, 1 | join: "/" | append: "/assets/symbol.svg" %}
70
+ {% assign relative_symbol_path = "/projects/" | append: symbol_path %}
71
+ <div class="logo"><img src="{{ relative_symbol_path }}"></div>
71
72
  </div>
72
73
  <h3 class="title">{{ item.title }}</h3>
73
74
  </header>
data/_includes/legal.html CHANGED
@@ -1,5 +1,12 @@
1
- <span class="copyright">Copyright © 2018 Ribose. All rights reserved.</span>
2
- <nav>
3
- <a href="https://www.ribose.com/tos">Terms</a>
4
- <a href="https://www.ribose.com/privacy">Privacy</a>
5
- </nav>
1
+ <span class="copyright">Copyright © 2018 {{ site.legal.name }}. All rights reserved.</span>
2
+
3
+ {% if site.legal.privacy_policy_link or site.legal.tos_link %}
4
+ <nav>
5
+ {% if site.legal.tos_link %}
6
+ <a href="{{ site.legal.tos_link }}">Terms of Service</a>
7
+ {% endif %}
8
+ {% if site.legal.privacy_policy_link %}
9
+ <a href="{{ site.legal.privacy_policy_link }}">Privacy Policy</a>
10
+ {% endif %}
11
+ </nav>
12
+ {% endif %}
data/_includes/logo.html CHANGED
@@ -1 +1 @@
1
- {% include _includes/symbol.svg %}&nbsp;<span class="title">{% include title.html %}</span>
1
+ {% include assets/symbol.svg %}&nbsp;<span class="title">{% include title.html %}</span>
@@ -9,17 +9,17 @@
9
9
 
10
10
  {% if include.post.parent_project == nil and site.is_hub == true %}
11
11
  <div class="hub-symbol" role="presentation">
12
- {% include _includes/symbol.svg %}
12
+ {% include assets/symbol.svg %}
13
13
  </div>
14
14
  {% endif %}
15
15
 
16
16
  <header>
17
17
  {% if include.post.parent_project %}
18
- {% assign project_symbol_path = "_projects/" | append: include.post.parent_project.name | append: "/_includes/symbol.svg" %}
19
- {% assign relative_symbol_path = "/" | append: project_symbol_path %}
18
+ {% assign project_symbol_path = include.post.parent_project.name | append: "/assets/symbol.svg" %}
19
+ {% assign relative_symbol_path = "/projects/" | append: project_symbol_path %}
20
20
  <div class="parent-project">
21
21
  <div class="project-logo" role="presentation">
22
- {% include {{ relative_symbol_path }} %}
22
+ <img src="{{ relative_symbol_path }}">
23
23
  </div>
24
24
  <h4 class="project-title">{{ include.post.parent_project.title }}</h4>
25
25
  <div class="external-link-icon" role="presentation">
@@ -18,10 +18,10 @@
18
18
 
19
19
  <header>
20
20
  {% if include.project_data != nil and include.project_name != nil %}
21
- {% assign project_symbol_path = "_projects/" | append: include.project_name | append: "/_includes/symbol.svg" %}
22
- {% assign relative_symbol_path = "/" | append: project_symbol_path %}
23
- <div class="parent-project">
24
- <div class="project-logo">{% include {{ relative_symbol_path }} %}</div>
21
+ {% assign project_symbol_path = include.project_name | append: "/assets/symbol.svg" %}
22
+ {% assign relative_symbol_path = "/projects/" | append: project_symbol_path %}
23
+ <div class="parent-project" role="presentation">
24
+ <div class="project-logo" role="presentation"><img src="{{ relative_symbol_path }}"></div>
25
25
  <h4 class="project-title">{{ include.project_data.title }}</h4>
26
26
  </div>
27
27
  {% endif %}
@@ -36,9 +36,9 @@
36
36
  {% include tag-list.html tags=include.item.tags %}
37
37
 
38
38
  {% if include.item.last_update %}
39
- <div class="last-update">
39
+ <section class="last-update">
40
40
  Last update: {{ include.item.last_update | date: "%d/%m/%Y" }}
41
- </div>
41
+ </section>
42
42
  {% endif %}
43
43
  </footer>
44
44
  </a>
@@ -1,3 +1,8 @@
1
- {% assign symbol_path = include.item_id | split: "/" | slice: 2, 1 | join: "/" | append: "/_includes/symbol.svg" %}
2
- {% assign relative_symbol_path = "/_software/" | append: symbol_path %}
3
- <div class="logo">{% include {{ relative_symbol_path }} %}</div>
1
+ {% assign symbol_path = include.item_id | split: "/" | slice: 2, 1 | join: "/" | append: "/assets/symbol.svg" %}
2
+ {% if include.include_inline %}
3
+ {% assign relative_symbol_path = "/_software/" | append: symbol_path %}
4
+ <div class="logo">{% include {{ relative_symbol_path }} %}</div>
5
+ {% else %}
6
+ {% assign relative_symbol_path = "/software/" | append: symbol_path %}
7
+ <div class="logo"><img src="{{ relative_symbol_path }}"></div>
8
+ {% endif %}
@@ -3,7 +3,7 @@ layout: default
3
3
  ---
4
4
 
5
5
  <section class="items">
6
- {% include _includes/symbol.svg %}
6
+ {% include assets/symbol.svg %}
7
7
 
8
8
  {% for item in page.posts_combined %}
9
9
  {% include post-card.html post=item %}
@@ -6,19 +6,18 @@ layout: default
6
6
 
7
7
  {% if num_projects > 0 %}
8
8
  <section class="items">
9
- {% include _includes/symbol.svg %}
9
+ {% include assets/symbol.svg %}
10
10
 
11
11
  {% for project in projects %}
12
- {% assign symbol_path = project.path | split: "/" | slice: 0, 2 | join: "/" | append: "/_includes/symbol.svg" %}
13
- {% assign relative_symbol_path = "/" | append: symbol_path %}
14
-
15
12
  <a class="item {% if project.featured == true %}featured{% endif %}"
16
13
  href="{{ project.home_url }}"
17
14
  role="article">
18
15
 
19
16
  <header>
20
17
  <div class="logo-container" role="presentation">
21
- <div class="logo">{% include {{ relative_symbol_path }} %}</div>
18
+ {% assign symbol_path = project.path | split: "/" | slice: 1, 1 | join: "/" | append: "/assets/symbol.svg" %}
19
+ {% assign relative_symbol_path = "/projects/" | append: symbol_path %}
20
+ <div class="logo"><img src="{{ relative_symbol_path }}"></div>
22
21
  </div>
23
22
  <h3 class="title">{{ project.title }}</h3>
24
23
  </header>
@@ -8,7 +8,7 @@ layout: default
8
8
 
9
9
  <section class="items">
10
10
  {% if site.is_hub %}
11
- {% include _includes/symbol.svg %}
11
+ {% include assets/symbol.svg %}
12
12
  {% endif %}
13
13
 
14
14
  {% for product in page.items %}
@@ -8,7 +8,7 @@ layout: default
8
8
 
9
9
  <section class="items">
10
10
  {% if site.is_hub %}
11
- {% include _includes/symbol.svg %}
11
+ {% include assets/symbol.svg %}
12
12
  {% endif %}
13
13
 
14
14
  {% for spec in page.items %}
@@ -415,11 +415,13 @@ body.project {
415
415
  $logo-space: 132px;
416
416
  $logo-side: 48px;
417
417
  padding-left: $logo-space;
418
+
418
419
  .logo-container {
419
420
  float: left;
420
421
  margin-left: -$logo-space;
421
422
  padding: 8px (($logo-space - $logo-side) / 2);
422
- .logo svg {
423
+
424
+ .logo > :only-child {
423
425
  width: $logo-side;
424
426
  height: $logo-side;
425
427
  }
@@ -471,7 +473,7 @@ body.project {
471
473
  .logo-container {
472
474
  margin-right: 10px;
473
475
 
474
- .logo svg {
476
+ .logo > :only-child {
475
477
  width: 32px;
476
478
  height: 32px;
477
479
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-open-project
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre5
4
+ version: 1.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-29 00:00:00.000000000 Z
11
+ date: 2018-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.0.0.pre
75
+ version: 1.0.0.pre2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.0.0.pre
82
+ version: 1.0.0.pre2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement