jekyll-theme-scrawl 0.1.14 → 0.1.15

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
- SHA1:
3
- metadata.gz: 17d57a473bb9ffbe72523473870841c606d4f542
4
- data.tar.gz: cb01a85ad52443299d5ae13b0e5b69bdae66afa2
2
+ SHA256:
3
+ metadata.gz: 34d3428662c5662e2d67e85601c0b66fb0579f4d5740c81078058d8f97cf832f
4
+ data.tar.gz: fc5200ce7f1bd3da552edaf83e233442f56d31923f3ef52a7f6f7252edec0c18
5
5
  SHA512:
6
- metadata.gz: 9f7e0138e0b69f02bd0635c10ee36faaa65b7b393e758a7eee9562c79c230d667e47d41203b8aa08be8907ac330f6e6cca03f7c1408d0685f5411aef70cb5588
7
- data.tar.gz: 3859165cf0f98c7ebb9fc607b9acf95ac24205d5edbabe491c92e6adc9e4240109e5b10d3c3fd22e6ece93b28e838f87cea38bf83d86fecaf2eb9f420a542185
6
+ metadata.gz: 5780bd7520b55238ed1ee6b519424170eb4dfe2740de624e1743d49f3db86850bf8ba85caab509a4d6b26c0c24aa4d3ed131e26977c2ca158f8c2ebce2fa779b
7
+ data.tar.gz: 0e971f9d24a2f717388a8acac5f2181f1db3d9e40f6c5244d8c0647f8870f645af1c84849d411802badafd0568ebbbfaef6ebe23b9c1478f5e1d893ac4442327
data/README.md CHANGED
@@ -1,42 +1,132 @@
1
1
  # The Scrawl theme
2
2
 
3
- Scrawl is a Jekyll theme based on [the Primer theme](https://github.com/pages-themes/primer) by GitHub.
3
+ **Organize documentation, playbooks, and other composition with Scrawl**
4
+
5
+ Scrawl is a page-centric theme for Jekyll. Rather than catering to posts like most Jekyll themes, Scrawl focuses on providing categorization and navigation for pages.
6
+
7
+ *The Scrawl theme is based on GitHub's [Primer theme](https://github.com/pages-themes/primer) and the left navigation is inspired by Steve Smith's [Minimal](https://github.com/orderedlist/minimal).*
4
8
 
5
9
  ## Installation
6
10
 
7
- Add this line to your Jekyll site's `Gemfile`:
11
+ Set Jekyll's `_config.yml` to pull the theme from the `lightster/jekyll-theme-scrawl` remote theme:
8
12
 
9
- ```ruby
10
- gem "jekyll-theme-scrawl"
13
+ ```yaml
14
+ remote_theme: lightster/jekyll-theme-scrawl
11
15
  ```
12
16
 
13
- And add this line to your Jekyll site's `_config.yml`:
17
+ ## Usage
18
+
19
+ Scrawl is all about pages.
14
20
 
21
+ ### Pages and their URLs
22
+
23
+ You will most likely want to create an `index.md` in the root of your Jekyll site. This is the page that the browser will load when first arriving at your site.
24
+
25
+ You can create more pages in the root of your Jekyll site, as well as subdirectories of the Jekyll site. Page URLs match the paths that appear in your site directory structure.
26
+
27
+ We like our page URLs to leave off the `.html`, so we include the following in our `_config.yml`:
15
28
  ```yaml
16
- theme: jekyll-theme-scrawl
29
+ permalink: pretty
17
30
  ```
18
31
 
19
- And then execute:
32
+ ### Layouts
20
33
 
21
- $ bundle
34
+ Scrawl provides the following layouts:
22
35
 
23
- Or install it yourself as:
36
+ - `base` The `base` layout is the base layout used by all other layouts. The base layout has two side-by-side independently scrolling panes. The left pane contains the site title, the site description, and the navigation. The right pane is wider and is used for displaying the content.
37
+ - `page` — The `page` layout is the default layout that pages use. The page layout is similar to the base layout but with a few additions:
38
+ - The `title` value provided in the page's front matter is displayed as a header above the page content
39
+ - The `summary` value provided in the page's front matter is displayed below the page title
40
+ - A table of contents is displayed below the page title and summary. The table of contents is generated based on the page's level 2, 3, and 4 headers (`<h2>`, `<h3>`, and `<h4>` tags).
41
+ - `sitemap` — The `sitemap` layout breaks the navigation into four columns that takes up the width of the layout.
24
42
 
25
- $ gem install jekyll-theme-scrawl
43
+ You can set the layout for a page in the page's Jekyll front matter:
44
+ ```yaml
45
+ ---
46
+ layout: base
47
+ ---
48
+ ```
26
49
 
27
- ## Usage
50
+ #### Widths
51
+
52
+ For the `default` and `page` layouts, there is a `width` setting for controlling how wide the content pane should be:
53
+ - `fixed` — The `fixed` width is the default. The fixed width layout stays the same width unless the browser window is not wide enough, in which case the navigation is moved into a hamburger menu and the page takes up the width of the browser window.
54
+ - `fluid` - The `fluid` width takes up the width of the browser window. If the browser window is not wide enough, the navigation is moved into a hamburger menu.
55
+ - `no-nav` – The `no-nav` width behaves like the `fixed` width setting, but it removes the navigation, allowing the content pane to take up the entirety of the fixed width.
56
+
57
+ You can set the width for a page in the page's Jekyll front matter:
58
+ ```yaml
59
+ ---
60
+ width: fluid
61
+ ---
62
+ ```
63
+
64
+ #### Mobile-friendly
65
+
66
+ All layouts and widths are mobile-friendly.
67
+
68
+ ### Navigation
69
+
70
+ The navigation is generated by aggregating all pages' front matter. By default, a page is included in the navigation as long as the page has a non-empty `title` value in its front matter.
28
71
 
29
- TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
72
+ #### Ordering links
73
+
74
+ Pages are sorted in the navigation based on the `order` value that you provide in the page front matter. You can set the `order` value to the same value as the page's title to order the pages in the navigation alphabetically.
75
+
76
+ If you do not set an `order` value, the ordering of items in the navigation is undefined and may vary between site builds.
77
+
78
+ #### Changing the link text
79
+
80
+ The `title` that appears in the front matter of the page is used for link text. If you want the link text to be something other than the page title, such as an abbreviated version of the page title, you can set `nav_title` in your page front matter.
81
+
82
+ #### Hiding links
83
+
84
+ If you have a page with a title but you do not want the page to appear in the navigation, you can exclude the page by setting `hide_in_nav` to `true` in your page front matter.
85
+
86
+ ### Page Categories
87
+
88
+ Scrawl allows pages to be organized into categories. These categories are used when displaying the pages in the side navigation and the site map.
89
+
90
+ Note that categories do not affect a page's URL. As noted in [Pages and their URLs](#pages-and-their-urls), page URLs match the paths that appear in your site directory structure.
91
+
92
+ #### Declaring categories
93
+
94
+ Before pages can be placed in categories, you need to define the categories. Categories are defined by creating a `_data/scrawl.yml` file and listing categories like so:
95
+ ```yaml
96
+ categories:
97
+ - title: Lunch
98
+ order: 1
99
+ key: lunch
100
+ - title: Dinner
101
+ order: 2
102
+ key: dinner
103
+ - title: Beverages
104
+ order: 3
105
+ key: beverage
106
+ ```
107
+
108
+ Each category should contain all three keys:
109
+ - `title` — The title appears in the navigation and site map as the title of the category.
110
+ - `order` — The order determines the order the category should appear relative to the other categories.
111
+ - `key` — The key is the value that is used in page front matter to place the page in the category.
112
+
113
+ #### Placing a page in a category
114
+
115
+ Once the categories are defined, you can place a page in a category by setting the `category` value in the page front matter like so:
116
+ ```yaml
117
+ ---
118
+ category: beverage
119
+ ---
120
+ ```
30
121
 
31
122
  ## Development
32
123
 
33
- To set up your environment to develop this theme, run `bundle install`.
124
+ To set up your environment to develop this theme, fork this repo, clone your fork to your localhost, and run `bundle install`.
34
125
 
35
- Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
126
+ The theme is setup just like a normal Jekyll site. Run `bundle exec jekyll serve` and open your browser to [`http://localhost:4000`](http://localhost:4000). As you make changes to your clone of the theme, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
36
127
 
37
- When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
38
- To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-scrawl.gemspec` accordingly.
128
+ When the theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git are bundled.
39
129
 
40
130
  ## License
41
131
 
42
- The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
132
+ The theme is available as open source under the terms of the [MIT License](LICENSE).
data/_includes/head.html CHANGED
@@ -21,5 +21,5 @@
21
21
  <script src="{{ '/assets/scripts.js?v=' | append: site.github.build_revision | relative_url }}" defer></script>
22
22
  <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous" defer></script>
23
23
  </head>
24
- <body class="{{ include.width | default: page.width | default: site.page_width | default: 'fixed' }}">
24
+ <body class="{{ include.width | default: page.width | default: layout.width | default: site.page_width | default: 'fixed' }}">
25
25
  <div class="container">
File without changes
data/_layouts/page.html CHANGED
@@ -1,12 +1,12 @@
1
1
  ---
2
- layout: default
2
+ layout: base
3
3
  ---
4
4
 
5
- {% if page.title %}
5
+ {% if page.title and page.title != '' %}
6
6
  {{ '# ' | append: page.title | markdownify }}
7
7
  {% endif %}
8
8
 
9
- {% if page.summary %}
9
+ {% if page.summary and page.summary != '' %}
10
10
  {{ page.summary | markdownify }}
11
11
  {% endif %}
12
12
 
@@ -1,7 +1,6 @@
1
1
  ---
2
- layout: default
2
+ layout: base
3
+ width: sitemap
3
4
  ---
4
5
 
5
- <div class="sitemap">
6
- {{ content }}
7
- </div>
6
+ {{ content }}
data/_sass/scrawl.scss CHANGED
@@ -114,7 +114,7 @@ body.fixed {
114
114
  }
115
115
  }
116
116
 
117
- body.headerless {
117
+ body.no-nav, body.sitemap {
118
118
  .container {
119
119
  max-width: 1012px;
120
120
  }
@@ -124,11 +124,15 @@ body.headerless {
124
124
  }
125
125
 
126
126
  section {
127
- padding: 25px 0;
127
+ padding: 0;
128
+ }
129
+
130
+ header .description p {
131
+ border-bottom: 1px solid #dbdddf;
128
132
  }
129
133
  }
130
134
 
131
- body.headerless.sitemap header {
135
+ body.sitemap header {
132
136
  nav {
133
137
  padding: 0;
134
138
  margin: 0;
@@ -136,10 +140,6 @@ body.headerless.sitemap header {
136
140
  flex-flow: row wrap;
137
141
  }
138
142
 
139
- .description p {
140
- border-bottom: 1px solid #dbdddf;
141
- }
142
-
143
143
  h2 {
144
144
  margin-bottom: 16px;
145
145
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-scrawl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Light
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-18 00:00:00.000000000 Z
11
+ date: 2018-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-pages
@@ -46,7 +46,7 @@ files:
46
46
  - _includes/js/turbolinks.js
47
47
  - _includes/nav.html
48
48
  - _includes/nav_category.html
49
- - _layouts/default.html
49
+ - _layouts/base.html
50
50
  - _layouts/page.html
51
51
  - _layouts/sitemap.html
52
52
  - _sass/jekyll-theme-scrawl.scss
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.6.14
83
+ rubygems_version: 2.7.6
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Jekyll theme for written