jekyll-theme-nocc 2.0.0 → 2.0.2
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/README.md +218 -22
- data/_config.yml +26 -25
- data/_plugins/_build_tags.rb +33 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4288d6988499cc0e80908ee8e434b0d2e4132a27a77fbfba44163d5290c03e27
|
4
|
+
data.tar.gz: 0a3768ebf8fd4ab34d7be73918e8f2d1ad3048cf013ac9a564170cfa0f3b0582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55a51971456413057b6834a278881eb0782680c73de9934d03e1e2490c0b2c38fbcce64e6e8dff9f366072ee3fb4d8da7a6f8c0541fa4b8b67399f27129214da
|
7
|
+
data.tar.gz: 6a1d7f12dc637a962ef2cab2646b15057b2a9d490edbdcfa3684c2c29db718d3279f808fa4e706f6fdb7d480183d8af7ed848cba02dc1102d4653dcf45cf3417
|
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# Jekyll Theme: NOCC Bootstrap Jekyll Theme
|
2
|
+
|
3
|
+
This README provides instructions for installing and configuring the NOCC Bootstrap Jekyll Theme.
|
2
4
|
|
3
5
|
## Introduction
|
4
6
|
|
@@ -8,22 +10,30 @@
|
|
8
10
|
|
9
11
|
It comes in three powerful options:
|
10
12
|
|
11
|
-
- **💎 Theme Jekyll Nocc**: A Ruby gem that brings the power of NOCC directly to your Jekyll project.
|
12
|
-
- **🌟 Nocc Bootstrap Theme**: An NPM Package that brings the power of NOCC directly to your NodeJS project.
|
13
|
-
- **🌐 Full Site Bundle for Jekyll**: A complete static website showcasing NOCC's seamless integration. Featuring a beautifully designed homepage, dynamic tag cloud, image gallery, and more.
|
13
|
+
- **💎 [Theme Jekyll Nocc](https://rubygems.org/gems/jekyll-theme-nocc)**: A Ruby gem that brings the power of NOCC directly to your Jekyll project.
|
14
|
+
- **🌟 [Nocc Bootstrap Theme](https://www.npmjs.com/package/nocc-bootstrap-theme)**: An NPM Package that brings the power of NOCC directly to your NodeJS project.
|
15
|
+
- **🌐 [Full Site Bundle for Jekyll](https://github.com/carlesloriente/bootstrap-theme-jekyll)**: A complete static website showcasing NOCC's seamless integration. Featuring a beautifully designed homepage, dynamic tag cloud, image gallery, and more.
|
14
16
|
|
15
17
|
> **ⓘ** NOCC is a complete replacement for Bootstrap 5.3.3
|
16
18
|
|
17
19
|
## Table of contents
|
18
20
|
|
19
|
-
- [jekyll-theme-nocc
|
21
|
+
- [Jekyll Theme: NOCC Bootstrap Jekyll Theme](#jekyll-theme-nocc-bootstrap-jekyll-theme)
|
20
22
|
- [Introduction](#introduction)
|
21
23
|
- [Table of contents](#table-of-contents)
|
22
24
|
- [Features](#features)
|
23
25
|
- [Installation](#installation)
|
24
|
-
|
26
|
+
- [1. Add the theme to your Gemfile](#1-add-the-theme-to-your-gemfile)
|
27
|
+
- [2. Specify the theme in your \_config.yml](#2-specify-the-theme-in-your-_configyml)
|
28
|
+
- [3. Install the theme](#3-install-the-theme)
|
29
|
+
- [Setting up the theme](#setting-up-the-theme)
|
30
|
+
- [1. Modify \_config.yml](#1-modify-_configyml)
|
31
|
+
- [2. Modify index.markdown](#2-modify-indexmarkdown)
|
32
|
+
- [How to enable](#how-to-enable)
|
33
|
+
- [Tags section](#tags-section)
|
34
|
+
- [Contact form](#contact-form)
|
35
|
+
- [Gallery section](#gallery-section)
|
25
36
|
- [Contributing](#contributing)
|
26
|
-
- [Development](#development)
|
27
37
|
- [Creator](#creator)
|
28
38
|
- [Thanks](#thanks)
|
29
39
|
- [Copyright and License](#copyright-and-license)
|
@@ -38,42 +48,228 @@ It comes in three powerful options:
|
|
38
48
|
|
39
49
|
## Installation
|
40
50
|
|
41
|
-
Add
|
51
|
+
### 1. Add the theme to your Gemfile
|
52
|
+
|
53
|
+
Add the following line to your Jekyll site's `Gemfile`:
|
42
54
|
|
43
55
|
```ruby
|
44
56
|
gem "jekyll-theme-nocc"
|
45
57
|
```
|
46
58
|
|
47
|
-
|
59
|
+
### 2. Specify the theme in your _config.yml
|
60
|
+
|
61
|
+
Add the following line to your Jekyll site's _config.yml file:
|
48
62
|
|
49
63
|
```yaml
|
50
64
|
theme: jekyll-theme-nocc
|
51
65
|
```
|
52
66
|
|
53
|
-
|
67
|
+
### 3. Install the theme
|
54
68
|
|
55
|
-
|
69
|
+
Execute the following command in your terminal:
|
56
70
|
|
57
|
-
|
71
|
+
```bash
|
72
|
+
bundle
|
73
|
+
```
|
58
74
|
|
59
|
-
|
75
|
+
Alternatively, you can install it directly using gem:
|
60
76
|
|
61
|
-
|
77
|
+
```bash
|
78
|
+
gem install jekyll-theme-nocc
|
79
|
+
```
|
62
80
|
|
63
|
-
|
81
|
+
## Setting up the theme
|
64
82
|
|
65
|
-
|
83
|
+
### 1. Modify _config.yml
|
66
84
|
|
67
|
-
|
85
|
+
Edit your Jekyll site's _config.yml file. It's recommended to add the following plugins after the jekyll-feed plugin if you're using it, to avoid potential conflicts:
|
86
|
+
|
87
|
+
```yaml
|
88
|
+
plugins:
|
89
|
+
- jekyll-feed
|
90
|
+
- jekyll-paginate
|
91
|
+
- jekyll-redirect-from
|
92
|
+
```
|
93
|
+
|
94
|
+
Next, add the following configuration options to your _config.yml file, replacing the placeholder values with your own:
|
95
|
+
|
96
|
+
```yaml
|
97
|
+
author: Your Name
|
98
|
+
author_url: "https://www.yoururl.com"
|
99
|
+
timezone: "Europe/Madrid" # Timezone for your site
|
100
|
+
full_description: >
|
101
|
+
A long description of your site. This can span multiple lines.
|
102
|
+
gh_repository: https://github.com/yourusername/yourrepo
|
103
|
+
encoding: "utf-8"
|
104
|
+
locale: "en-US" # Language and locale
|
105
|
+
lang: "en" # Language code
|
106
|
+
email: "your_email_address"
|
107
|
+
permalink: pretty # URL structure for posts
|
108
|
+
|
109
|
+
# Site Manifest (for PWA support)
|
110
|
+
name: "Site name"
|
111
|
+
short_name: "NAME"
|
112
|
+
language: "en"
|
113
|
+
lang_direction: "ltr"
|
114
|
+
color: "#FFFFFF" # Background color for manifest
|
115
|
+
|
116
|
+
# Social Profiles
|
117
|
+
linkedin_username: your_linkedin_username
|
118
|
+
|
119
|
+
# Google Analytics (Optional)
|
120
|
+
google_analytics: "G-XXXXXXXXXX" # Your Google Analytics tracking ID
|
121
|
+
google_site_verification: "YOUR_GOOGLE_SITE_VERIFICATION_TOKEN" # Optional: For Google Search Console verification.
|
122
|
+
google_adsense_account: "ca-pub-XXXXXXXXXXXXXXXX" # Optional: Your AdSense account ID
|
123
|
+
google_tag_id: "GTM-XXXXXXX" # Optional: Your Google Tag Manager ID
|
124
|
+
|
125
|
+
# Disqus Comments (Optional)
|
126
|
+
disqus_shortname: your_disqus_shortname # Leave blank to disable comments site-wide. You can disable comments on individual posts by adding `comments: false` to the post's YAML front matter.
|
127
|
+
|
128
|
+
# Formspree Contact Form
|
129
|
+
formemail: "your_formemail_address" # Your Formspree email address (see "How to enable the contact form" section)
|
130
|
+
|
131
|
+
# Theme Information (Please do not remove these)
|
132
|
+
theme_version : v2.0.2
|
133
|
+
theme_name : NOCC Bootstrap Jekyll Theme
|
134
|
+
theme_repo : https://github.com/carlesloriente/jekyll-theme-nocc/
|
135
|
+
theme_url : https://bootstrap-theme.notesoncloudcomputing.com/
|
136
|
+
theme_author : Carles Loriente
|
137
|
+
theme_author_url : https://www.notesoncloudcomputing.com/about/
|
138
|
+
theme_download : https://github.com/carlesloriente/jekyll-theme-nocc/archive/refs/heads/main.zip
|
139
|
+
theme_package : https://rubygems.org/gems/jekyll-theme-nocc
|
140
|
+
theme_logo : "/assets/vendor/nocc-bootstrap-theme/images/nocc/nocc_logo.webp"
|
141
|
+
|
142
|
+
exclude: ["AUTHORS.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "CODEOWNERS", "LICENSE", "README.md", "SECURITY.md", "WORKFLOW.md", "Gemfile", "Gemfile.lock", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"]
|
143
|
+
```
|
144
|
+
|
145
|
+
### 2. Modify index.markdown
|
146
|
+
|
147
|
+
Edit your `index.markdown` file and add the following front matter parameters after `layout: home`:
|
148
|
+
|
149
|
+
```markdown
|
150
|
+
background: '/assets/images/bg-index.webp'
|
151
|
+
carousel:
|
152
|
+
- '/assets/images/bg-index.webp'
|
153
|
+
- '/assets/images/bg-index-2.webp'
|
154
|
+
- '/assets/images/bg-index-3.webp'
|
155
|
+
```
|
156
|
+
|
157
|
+
## How to enable
|
158
|
+
|
159
|
+
### Tags section
|
160
|
+
|
161
|
+
**1. Create a new file named tags.markdown in your site's root directory**.
|
68
162
|
|
69
|
-
|
163
|
+
**2. Add the following content to tags.markdown**:
|
70
164
|
|
71
|
-
|
165
|
+
```markdown
|
166
|
+
---
|
167
|
+
title: Tags list
|
168
|
+
layout: tags_index
|
169
|
+
permalink: /tags/
|
170
|
+
description: A tag cloud from posts
|
171
|
+
categories: tags
|
172
|
+
background: '/assets/images/bg-gallery.webp'
|
173
|
+
tagsindex: true
|
174
|
+
---
|
175
|
+
```
|
176
|
+
|
177
|
+
**3. To add tags to your posts, include the tags front matter parameter in your post files**:
|
178
|
+
|
179
|
+
```markdown
|
180
|
+
tags:
|
181
|
+
- firsttag
|
182
|
+
- secondtag
|
183
|
+
- another-tag
|
184
|
+
```
|
185
|
+
|
186
|
+
### Contact form
|
187
|
+
|
188
|
+
This theme uses Formspree to handle contact form submissions.
|
189
|
+
|
190
|
+
1. Create a Formspree account: Sign up for a free account at [FormSpree](https://formspree.io/).
|
191
|
+
|
192
|
+
2. Create a new form in your Formspree account.
|
193
|
+
|
194
|
+
3. Create a new file named `contact.html` in your site's root directory.
|
195
|
+
|
196
|
+
4. Add the contact form code: Add the following content to contact.html, replacing `YOUR_FORM_ID` with the ID from your Formspree form (you'll find it in the Formspree form's setup instructions):
|
197
|
+
|
198
|
+
```html
|
199
|
+
---
|
200
|
+
layout: page
|
201
|
+
title: Contact
|
202
|
+
permalink: /contact/
|
203
|
+
description: Contact me form
|
204
|
+
categories: contact me
|
205
|
+
background: '/assets/images/bg-contact.webp'
|
206
|
+
form: true
|
207
|
+
---
|
208
|
+
|
209
|
+
<p>Want to get in touch? Send me a message!</p>
|
210
|
+
<form name="sentMessage" id="contactForm" novalidate>
|
211
|
+
<div class="control-group">
|
212
|
+
<div class="form-group floating-label-form-group controls">
|
213
|
+
<label>Name</label>
|
214
|
+
<input type="text" class="form-control" placeholder="Name" id="name" required data-bs-validation-required-message="Please enter your name.">
|
215
|
+
<p class="help-block text-danger"></p>
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
<div class="control-group">
|
219
|
+
<div class="form-group floating-label-form-group controls">
|
220
|
+
<label>Email Address</label>
|
221
|
+
<input type="email" class="form-control" placeholder="Email Address" id="email" required data-bs-validation-required-message="Please enter your email address.">
|
222
|
+
<p class="help-block text-danger"></p>
|
223
|
+
</div>
|
224
|
+
</div>
|
225
|
+
<div class="control-group">
|
226
|
+
<div class="form-group floating-label-form-group controls">
|
227
|
+
<label>Message</label>
|
228
|
+
<textarea rows="5" class="form-control" placeholder="Message" id="message" required data-bs-validation-required-message="Please enter a message."></textarea>
|
229
|
+
<p class="help-block text-danger"></p>
|
230
|
+
</div>
|
231
|
+
</div>
|
232
|
+
<br>
|
233
|
+
<div id="success"></div>
|
234
|
+
<div class="form-group">
|
235
|
+
<button type="submit" class="btn btn-primary float-end" id="sendMessageButton">Send</button>
|
236
|
+
</div>
|
237
|
+
</form>
|
238
|
+
```
|
239
|
+
|
240
|
+
Configure `formemail` in `_config.yml`: While the form submits directly to Formspree, you should still set the formemail option in your `_config.yml` file. This is used by the theme for other purposes, even if not directly related to the contact form itself.
|
241
|
+
|
242
|
+
You can use a service like Firefox Relay to protect your actual email address.
|
243
|
+
|
244
|
+
```yaml
|
245
|
+
formemail : "form@email.com"
|
246
|
+
```
|
72
247
|
|
73
|
-
|
248
|
+
### Gallery section
|
74
249
|
|
75
|
-
|
76
|
-
|
250
|
+
1. Create the gallery directory: Create a directory named `gallery` inside your `assets/images` directory.
|
251
|
+
|
252
|
+
2. Add images: Place all the images you want to display in the gallery section into the newly created `gallery` directory.
|
253
|
+
|
254
|
+
3. Create a new file named `gallery.html` in your site's root directory.
|
255
|
+
|
256
|
+
4. Add the following content to gallery.html:
|
257
|
+
|
258
|
+
```html
|
259
|
+
---
|
260
|
+
layout: images_gallery
|
261
|
+
title: Gallery
|
262
|
+
description: A gallery of images used in the article header.
|
263
|
+
categories: gallery images
|
264
|
+
background: '/assets/images/bg-gallery.webp'
|
265
|
+
---
|
266
|
+
```
|
267
|
+
|
268
|
+
This will automatically display all images found in the `assets/images/gallery` directory. The `images_gallery` layout handles the display logic. No further configuration is usually required.
|
269
|
+
|
270
|
+
## Contributing
|
271
|
+
|
272
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/carlesloriente/jekyll-theme-nocc. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
|
77
273
|
|
78
274
|
## Creator
|
79
275
|
|
data/_config.yml
CHANGED
@@ -1,44 +1,33 @@
|
|
1
1
|
landing : false
|
2
|
-
title :
|
2
|
+
title : Site title
|
3
3
|
author : Your Name
|
4
|
-
url : "https://www.
|
4
|
+
url : "https://www.yoursiteurl.com"
|
5
5
|
author_url : "https://www.yoururl.com"
|
6
6
|
baseurl : "/"
|
7
7
|
timezone : "Europe/Madrid"
|
8
|
-
description :
|
8
|
+
description : Short description of your site.
|
9
9
|
full_description : >
|
10
|
-
A
|
10
|
+
A long description of your site.
|
11
11
|
gh_repository : https://github.com/yourusername/yourrepo/
|
12
12
|
encoding : "utf-8"
|
13
13
|
locale : "en-US"
|
14
14
|
lang : "en"
|
15
|
-
formemail :
|
15
|
+
formemail : "form@email.com"
|
16
|
+
email : "you@email.com"
|
16
17
|
permalink : pretty
|
17
18
|
|
18
19
|
# Manifest
|
19
|
-
name : "
|
20
|
-
short_name : "
|
20
|
+
name : "Site name"
|
21
|
+
short_name : "NAME"
|
21
22
|
language : "en"
|
22
23
|
lang_direction : "ltr"
|
23
24
|
color : "#FFFFFF"
|
24
25
|
|
25
|
-
#
|
26
|
-
|
27
|
-
theme_name : NOCC Bootstrap Jekyll Theme
|
28
|
-
theme_repo : https://github.com/carlesloriente/jekyll-theme-nocc/
|
29
|
-
theme_url : https://bootstrap-theme.notesoncloudcomputing.com/
|
30
|
-
theme_author : Carles Loriente
|
31
|
-
theme_author_url : https://www.notesoncloudcomputing.com/about/
|
32
|
-
theme_download : https://github.com/carlesloriente/jekyll-theme-nocc/archive/refs/heads/main.zip
|
33
|
-
theme_package : https://rubygems.org/gems/jekyll-theme-nocc
|
34
|
-
theme_logo : "/assets/vendor/nocc-bootstrap-theme/images/nocc/nocc_logo.webp"
|
35
|
-
|
36
|
-
# Social Profiles
|
37
|
-
email : "you@email.com"
|
38
|
-
twitter_username :
|
26
|
+
# Add your Social Profiles
|
27
|
+
twitter_username :
|
39
28
|
github_username :
|
40
29
|
linkedin_username :
|
41
|
-
kofi
|
30
|
+
kofi :
|
42
31
|
|
43
32
|
# Add your google-analytics ID here to activate google analytics
|
44
33
|
google_site_verification:
|
@@ -46,11 +35,23 @@ google_analytics :
|
|
46
35
|
google_adsense_account :
|
47
36
|
google_tag_id :
|
48
37
|
|
49
|
-
# Disqus Comments
|
50
|
-
# Leave shortname blank to disable comments site-wide.
|
38
|
+
# Disqus Comments. Leave shortname blank to disable comments site-wide.
|
51
39
|
# Disable comments for any post by adding `comments: false` to that post's YAML Front Matter.
|
52
40
|
disqus_shortname :
|
53
41
|
|
42
|
+
|
43
|
+
# Theme Notice (please don't remove it ;))
|
44
|
+
theme_version : v2.0.0
|
45
|
+
theme_name : NOCC Bootstrap Jekyll Theme
|
46
|
+
theme_repo : https://github.com/carlesloriente/jekyll-theme-nocc/
|
47
|
+
theme_url : https://bootstrap-theme.notesoncloudcomputing.com/
|
48
|
+
theme_author : Carles Loriente
|
49
|
+
theme_author_url : https://www.notesoncloudcomputing.com/about/
|
50
|
+
theme_download : https://github.com/carlesloriente/jekyll-theme-nocc/archive/refs/heads/main.zip
|
51
|
+
theme_package : https://rubygems.org/gems/jekyll-theme-nocc
|
52
|
+
theme_logo : "/assets/vendor/nocc-bootstrap-theme/images/nocc/nocc_logo.webp"
|
53
|
+
|
54
|
+
# Site settings
|
54
55
|
includes_dir : _includes
|
55
56
|
layouts_dir : _layouts
|
56
57
|
plugins_dir : _plugins
|
@@ -88,7 +89,7 @@ kramdown:
|
|
88
89
|
|
89
90
|
# Build settings
|
90
91
|
paginate : 20
|
91
|
-
paginate_path : "/
|
92
|
+
paginate_path : "/posts/page:num/"
|
92
93
|
plugins:
|
93
94
|
- jekyll-feed
|
94
95
|
- jekyll-paginate
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Jekyll
|
2
|
+
class TagIndex < Page
|
3
|
+
def initialize(site, base, dir, tag)
|
4
|
+
@site = site
|
5
|
+
@base = base
|
6
|
+
@dir = dir
|
7
|
+
@name = 'index.html'
|
8
|
+
self.process(@name)
|
9
|
+
self.read_yaml(File.join(base, '_layouts'), 'tag.html')
|
10
|
+
self.data['tag'] = tag
|
11
|
+
self.data['title'] = "#{tag}"
|
12
|
+
self.data['description'] = "List of posts with tag #{tag}."
|
13
|
+
self.data['og:description'] = "List of posts with tag #{tag}."
|
14
|
+
end
|
15
|
+
end
|
16
|
+
class TagGenerator < Generator
|
17
|
+
safe true
|
18
|
+
def generate(site)
|
19
|
+
if site.layouts.key? 'tag'
|
20
|
+
dir = site.config['tags_dir'] || 'tag'
|
21
|
+
site.tags.keys.each do |tag|
|
22
|
+
write_tag_index(site, File.join(dir, tag), tag)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
def write_tag_index(site, dir, tag)
|
27
|
+
index = TagIndex.new(site, site.source, dir, tag)
|
28
|
+
index.render(site.layouts, site.site_payload)
|
29
|
+
index.write(site.dest)
|
30
|
+
site.pages << index
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-nocc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carles Loriente
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-02-
|
10
|
+
date: 2025-02-17 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: jekyll
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- _layouts/posts_index.html
|
151
151
|
- _layouts/tag.html
|
152
152
|
- _layouts/tags_index.html
|
153
|
+
- _plugins/_build_tags.rb
|
153
154
|
- _sass/_custom.scss
|
154
155
|
- assets/css/styles.scss
|
155
156
|
- assets/images/404.webp
|
@@ -267,9 +268,9 @@ require_paths:
|
|
267
268
|
- lib
|
268
269
|
required_ruby_version: !ruby/object:Gem::Requirement
|
269
270
|
requirements:
|
270
|
-
- - "
|
271
|
+
- - "~>"
|
271
272
|
- !ruby/object:Gem::Version
|
272
|
-
version: '
|
273
|
+
version: '3.2'
|
273
274
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
274
275
|
requirements:
|
275
276
|
- - ">="
|