jekyll-theme-primer 0.5.4 → 0.6.0

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
  SHA256:
3
- metadata.gz: 16e730cf781c1ca7e6207cf9997e7208244de27b37c0e603e4e4309fa3db0be0
4
- data.tar.gz: 25ca151cf575a9bf828f7db9f1edbab4f7a8183432b36b99bdc2b4a3e2899efe
3
+ metadata.gz: ca90b72e4871f1eb4d6b242f7b2b694598cdf3c03c1f14747e44be00c6798dc4
4
+ data.tar.gz: 5c513719e585c9befb96c9991fd412c7425bb4cb6e20d3bfffae896e85df2a1c
5
5
  SHA512:
6
- metadata.gz: 796102aa486c59b5dd67dc5a72128785de7ab45bf56c9075db425fd3504ff5bb8b7efa3c7096265999302b7d166813ba731fe7c92b0ff52ffda6f35db2ca623c
7
- data.tar.gz: daa0adf9f486eda1bff2007ff39d03b23d87d940b6cb8ec8761bdb48355246d2131d0edb983a0df88f49a21ad4947fcda8c27f4adba1c2a429206c293c5c9240
6
+ metadata.gz: ac0788b1abac6c78db45dcc2cadfd942ca02d6ff0808e3768c517dc9bd27c01a6c87bfaf665094c38c051ffa64edd4b73971f68ba063a1c6d135b1d85468a231
7
+ data.tar.gz: 68e1d761e48c3b7d70ebf209b115cf6aa46d852c0509d7b92a84c2275103d58a63b22167caa2b538c3a69b2db6b5bfe1ab84223b35ca872fea5c930e14370025
data/README.md CHANGED
@@ -1,19 +1,21 @@
1
1
  # The Primer theme
2
2
 
3
- [![Build Status](https://travis-ci.org/pages-themes/primer.svg?branch=master)](https://travis-ci.org/pages-themes/primer) [![Gem Version](https://badge.fury.io/rb/jekyll-theme-primer.svg)](https://badge.fury.io/rb/jekyll-theme-primer)
3
+ [![.github/workflows/ci.yaml](https://github.com/pages-themes/primer/actions/workflows/ci.yaml/badge.svg)](https://github.com/pages-themes/primer/actions/workflows/ci.yaml) [![Gem Version](https://badge.fury.io/rb/jekyll-theme-primer.svg)](https://badge.fury.io/rb/jekyll-theme-primer)
4
4
 
5
5
  *Primer is a Jekyll theme for GitHub Pages. You can [preview the theme to see what it looks like](http://pages-themes.github.io/primer), or even [use it today](#usage).*
6
6
 
7
- ## Usage
7
+ ![Thumbnail of Primer](thumbnail.png)
8
8
 
9
- > **_NOTE:_** Primer is now the default theme for GitHub Pages, but you can still specify the theme you're using as below.
9
+ ## Usage
10
10
 
11
11
  To use the Primer theme:
12
12
 
13
13
  1. Add the following to your site's `_config.yml`:
14
14
 
15
15
  ```yml
16
- theme: jekyll-theme-primer
16
+ remote_theme: pages-themes/primer@v0.2.0
17
+ plugins:
18
+ - jekyll-remote-theme # add this line to the plugins list if you already have one
17
19
  ```
18
20
 
19
21
  2. Optionally, if you'd like to preview your site on your computer, add the following to your site's `Gemfile`:
@@ -22,8 +24,6 @@ To use the Primer theme:
22
24
  gem "github-pages", group: :jekyll_plugins
23
25
  ```
24
26
 
25
-
26
-
27
27
  ## Customizing
28
28
 
29
29
  ### Configuration variables
@@ -38,6 +38,7 @@ description: [A short description of your site's purpose]
38
38
  Additionally, you may choose to set the following optional variables:
39
39
 
40
40
  ```yml
41
+ show_downloads: ["true" or "false" (unquoted) to indicate whether to provide a download URL]
41
42
  google_analytics: [Your Google Analytics tracking ID]
42
43
  ```
43
44
 
@@ -55,14 +56,38 @@ If you'd like to add your own custom styles:
55
56
  ```
56
57
  3. Add any custom CSS (or Sass, including imports) you'd like immediately after the `@import` line
57
58
 
59
+ *Note: If you'd like to change the theme's Sass variables, you must set new values before the `@import` line in your stylesheet.*
60
+
58
61
  ### Layouts
59
62
 
60
63
  If you'd like to change the theme's HTML layout:
61
64
 
62
- 1. [Copy the original template](https://github.com/pages-themes/primer/blob/master/_layouts/default.html) from the theme's repository<br />(*Pro-tip: click "raw" to make copying easier*)
63
- 2. Create a file called `/_layouts/default.html` in your site
64
- 3. Paste the default layout content copied in the first step
65
- 4. Customize the layout as you'd like
65
+ 1. For some changes such as a custom `favicon`, you can add custom files in your local `_includes` folder. The files [provided with the theme](https://github.com/pages-themes/primer/tree/master/_includes) provide a starting point and are included by the [original layout template](https://github.com/pages-themes/primer/blob/master/_layouts/default.html).
66
+ 2. For more extensive changes, [copy the original template](https://github.com/pages-themes/primer/blob/master/_layouts/default.html) from the theme's repository<br />(*Pro-tip: click "raw" to make copying easier*)
67
+ 3. Create a file called `/_layouts/default.html` in your site
68
+ 4. Paste the default layout content copied in the first step
69
+ 5. Customize the layout as you'd like
70
+
71
+ ### Customizing Google Analytics code
72
+
73
+ Google has released several iterations to their Google Analytics code over the years since this theme was first created. If you would like to take advantage of the latest code, paste it into `_includes/head-custom-google-analytics.html` in your Jekyll site.
74
+
75
+ ### Overriding GitHub-generated URLs
76
+
77
+ Templates often rely on URLs supplied by GitHub such as links to your repository or links to download your project. If you'd like to override one or more default URLs:
78
+
79
+ 1. Look at [the template source](https://github.com/pages-themes/primer/blob/master/_layouts/default.html) to determine the name of the variable. It will be in the form of `{{ site.github.zip_url }}`.
80
+ 2. Specify the URL that you'd like the template to use in your site's `_config.yml`. For example, if the variable was `site.github.url`, you'd add the following:
81
+ ```yml
82
+ github:
83
+ zip_url: http://example.com/download.zip
84
+ another_url: another value
85
+ ```
86
+ 3. When your site is built, Jekyll will use the URL you specified, rather than the default one provided by GitHub.
87
+
88
+ *Note: You must remove the `site.` prefix, and each variable name (after the `github.`) should be indent with two space below `github:`.*
89
+
90
+ For more information, see [the Jekyll variables documentation](https://jekyllrb.com/docs/variables/).
66
91
 
67
92
  ## Roadmap
68
93
 
@@ -88,4 +113,4 @@ If you'd like to preview the theme locally (for example, in the process of propo
88
113
 
89
114
  ### Running tests
90
115
 
91
- The theme contains a minimal test suite, to ensure a site with the theme would build successfully. To run the tests, simply run `script/cibuild`. You'll need to run `script/bootstrap` one before the test script will work.
116
+ The theme contains a minimal test suite, to ensure a site with the theme would build successfully. To run the tests, simply run `script/cibuild`. You'll need to run `script/bootstrap` once before the test script will work.
@@ -0,0 +1,10 @@
1
+ {% if site.google_analytics %}
2
+ <script>
3
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
4
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
5
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
6
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
7
+ ga('create', '{{ site.google_analytics }}', 'auto');
8
+ ga('send', 'pageview');
9
+ </script>
10
+ {% endif %}
@@ -0,0 +1,9 @@
1
+ <!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
2
+
3
+ <!-- Setup Google Analytics -->
4
+ {% include head-custom-google-analytics.html %}
5
+
6
+ <!-- You can set your favicon here -->
7
+ <!-- link rel="shortcut icon" type="image/x-icon" href="{{ '/favicon.ico' | relative_url }}" -->
8
+
9
+ <!-- end custom head snippets -->
@@ -7,6 +7,7 @@
7
7
 
8
8
  {% seo %}
9
9
  <link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
10
+ {% include head-custom.html %}
10
11
  </head>
11
12
  <body>
12
13
  <div class="container-lg px-3 my-5 markdown-body">
@@ -24,15 +25,5 @@
24
25
  </div>
25
26
  <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
26
27
  <script>anchors.add();</script>
27
- {% if site.google_analytics %}
28
- <script>
29
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
30
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
31
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
32
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
33
- ga('create', '{{ site.google_analytics }}', 'auto');
34
- ga('send', 'pageview');
35
- </script>
36
- {% endif %}
37
28
  </body>
38
29
  </html>
data/_sass/primer.scss ADDED
@@ -0,0 +1,4 @@
1
+ // Placeholder file. If your site uses
2
+ // @import "{{ site.theme }}";
3
+ // Then using this theme with jekyll-remote-theme will work fine.
4
+ @import "jekyll-theme-primer";
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-primer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-23 00:00:00.000000000 Z
11
+ date: 2021-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -73,19 +73,19 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: '3.0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: rubocop
76
+ name: rubocop-github
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.50'
81
+ version: '0.16'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.50'
88
+ version: '0.16'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: w3c_validators
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -100,7 +100,7 @@ dependencies:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '1.3'
103
- description:
103
+ description:
104
104
  email:
105
105
  - open-source@github.com
106
106
  executables: []
@@ -110,6 +110,8 @@ files:
110
110
  - LICENSE.md
111
111
  - README.md
112
112
  - _includes/.gitkeep
113
+ - _includes/head-custom-google-analytics.html
114
+ - _includes/head-custom.html
113
115
  - _layouts/default.html
114
116
  - _layouts/home.html
115
117
  - _layouts/page.html
@@ -154,13 +156,14 @@ files:
154
156
  - _sass/primer-utilities/lib/padding.scss
155
157
  - _sass/primer-utilities/lib/typography.scss
156
158
  - _sass/primer-utilities/lib/visibility-display.scss
159
+ - _sass/primer.scss
157
160
  - _sass/rouge.scss
158
161
  - assets/css/style.scss
159
162
  homepage: https://github.com/pages-themes/jekyll-theme-primer
160
163
  licenses:
161
164
  - MIT
162
165
  metadata: {}
163
- post_install_message:
166
+ post_install_message:
164
167
  rdoc_options: []
165
168
  require_paths:
166
169
  - lib
@@ -168,15 +171,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
168
171
  requirements:
169
172
  - - ">="
170
173
  - !ruby/object:Gem::Version
171
- version: '0'
174
+ version: 2.4.0
172
175
  required_rubygems_version: !ruby/object:Gem::Requirement
173
176
  requirements:
174
177
  - - ">="
175
178
  - !ruby/object:Gem::Version
176
179
  version: '0'
177
180
  requirements: []
178
- rubygems_version: 3.0.6
179
- signing_key:
181
+ rubygems_version: 3.2.15
182
+ signing_key:
180
183
  specification_version: 4
181
184
  summary: Primer is a Jekyll theme for GitHub Pages based on GitHub's Primer styles
182
185
  test_files: []