jekyll-theme-zer0 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +71 -153
  3. data/_layouts/blog.html +221 -0
  4. data/_layouts/landing.html +18 -0
  5. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f51889f72c3949cdfc2a364886b710ff778164e254a586a1ff4dafc628d6743d
4
- data.tar.gz: eb237dcc3999a7ea65f62ed7db483cbda799cc4c12913a4b92176b279dba7375
3
+ metadata.gz: 54143764fa2227d99167438eb1a68c6e98e5133e0d01f2b2633acd88be6a3a00
4
+ data.tar.gz: 4d5ccc9af8f8aaf8d478789588419732268637965a655609bdad43c8d214c768
5
5
  SHA512:
6
- metadata.gz: f3a48c3bf56d3eafe8e059a250ec828762ec6d016e90a80a663e4db4c6db8da0781dcc1afa94d67c8ac3edff0272711d87330c1db54985f1cef110f91e464203
7
- data.tar.gz: 810c5f6750d2dbafa59820a7821a7705e8481d71670e6be00bc44a8d66bf96a4dd2c45cee64644901a42099e4c6cc0a7ab74f87aae04c39cc67604bce8d4d4e3
6
+ metadata.gz: 319dce277549bc6825dde7174f75000c04fef3c77ebba798d8a0041c761fe31da2690eb6d1c90c0d6b515192333bb1e5f42b00a2f6f065f9ce0479999ddf4d2b
7
+ data.tar.gz: 8b0f559ed7a5a01314a0f02a392d63700f10fc17d179741297e6ac751a9cd02c01571eeac2fdab82ea8e42b23b809319b181e9bf99b3bc54f04571a09a5ac178
data/README.md CHANGED
@@ -30,13 +30,16 @@ snippet: What is a snippet?
30
30
  comments: true
31
31
  ---
32
32
 
33
+ [![pages-build-deployment](https://github.com/bamr87/zer0-mistakes/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/bamr87/zer0-mistakes/actions/workflows/pages/pages-build-deployment)
34
+
35
+ [![Gem Version](https://badge.fury.io/rb/jekyll-theme-zer0.svg)](https://badge.fury.io/rb/jekyll-theme-zer0)
36
+
33
37
  This is the seed of the project with all the commands, scripts, and instructions that build this application from the ground up.
34
38
  In theory, this should be the only file you need to build the project from scratch.
35
39
  However, in practice, you may need to install additional dependencies or configure the environment to match the target system.
36
40
  For example, you may need to install Ruby, Node.js, or other tools to run the application locally or deploy it to a server.
37
41
  Therefore, part of this document is to provide a list of prerequisites and setup instructions to help you get started with the project.
38
42
 
39
- [![Gem Version](https://badge.fury.io/rb/jekyll-theme-zer0.svg)](https://badge.fury.io/rb/jekyll-theme-zer0)
40
43
 
41
44
  ## System Specs
42
45
 
@@ -110,12 +113,45 @@ More importantly, you need to:
110
113
  Make sure you have the following installed on your machine:
111
114
 
112
115
  ```shell
113
- # install and update prerequisites
114
-
115
- brew install git
116
- brew install gh
117
- brew install --cask docker
118
- brew install --cask visual-studio-code
116
+ # Check if git is installed
117
+ if ! git --version > /dev/null 2>&1; then
118
+ echo "git is not installed. Installing..."
119
+ brew install git
120
+ else
121
+ echo "git is already installed."
122
+ fi
123
+
124
+ # Check if gh is installed
125
+ if ! gh --version > /dev/null 2>&1; then
126
+ echo "gh is not installed. Installing..."
127
+ brew install gh
128
+ else
129
+ echo "gh is already installed."
130
+ fi
131
+
132
+ # Check if gh is authenticated
133
+ if ! gh auth status > /dev/null 2>&1; then
134
+ echo "gh is not authenticated. Please authenticate..."
135
+ gh auth login
136
+ else
137
+ echo "gh is already authenticated."
138
+ fi
139
+
140
+ # Check if Docker is installed
141
+ if ! docker --version > /dev/null 2>&1; then
142
+ echo "Docker is not installed. Installing..."
143
+ brew install --cask docker
144
+ else
145
+ echo "Docker is already installed."
146
+ fi
147
+
148
+ # Check if Visual Studio Code is installed
149
+ if ! code --version > /dev/null 2>&1; then
150
+ echo "Visual Studio Code is not installed. Installing..."
151
+ brew install --cask visual-studio-code
152
+ else
153
+ echo "Visual Studio Code is already installed."
154
+ fi
119
155
  ```
120
156
 
121
157
  ## Environment
@@ -132,7 +168,7 @@ brew install --cask visual-studio-code
132
168
  # Or use the following to set the environment variables
133
169
 
134
170
  export GITHOME=~/github
135
- export GHUSER=bamr87
171
+ export GHUSER=$(gh api user --jq '.login')
136
172
  export GIT_REPO=zer0-mistakes
137
173
  export ZREPO=$GITHOME/$GIT_REPO
138
174
  ```
@@ -254,6 +290,27 @@ echo " gem 'jekyll-paginate', '~> 1.1'" >> Gemfile
254
290
  echo "end" >> Gemfile
255
291
  ```
256
292
 
293
+ ### Configure Jekyll
294
+
295
+ ```shell
296
+ code _config.yml
297
+ ```
298
+
299
+ ```yaml
300
+ theme: jekyll-theme-zer0
301
+
302
+ title: zer0-mistakes
303
+ email: bamr87@zer0-mistakes.com
304
+ description: >- # this means to ignore newlines until "baseurl:"
305
+ Write an awesome description for your new site here. You can edit this
306
+ line in _config.yml. It will appear in your document head meta (for
307
+ Google search results) and in your feed.xml site description.
308
+ baseurl: null # the subpath of your site, e.g. /blog
309
+ url: null # the base hostname & protocol for your site, e.g. http://example.com
310
+ twitter_username: bamr87
311
+ github_username: bamr87
312
+ ```
313
+
257
314
  ### Create Dockerfile
258
315
 
259
316
  ```shell
@@ -302,55 +359,6 @@ open http://localhost:4000/
302
359
 
303
360
  ![](/assets/images/zer0-checkpoint-2.png)
304
361
 
305
- ## Install Jekyll
306
-
307
- Install [jekyll](https://jekyllrb.com/docs/installation/)
308
-
309
- ```shell
310
- jekyll new ./ --force
311
- bundle install
312
- ```
313
-
314
- ## Checkpoint - Jekyll Initialized
315
-
316
-
317
- ```shell
318
- code _config.yml
319
- ```
320
-
321
- ```yaml
322
- theme: jekyll-theme-zer0
323
-
324
- title: zer0-mistakes
325
- email: bamr87@zer0-mistakes.com
326
- description: >- # this means to ignore newlines until "baseurl:"
327
- Write an awesome description for your new site here. You can edit this
328
- line in _config.yml. It will appear in your document head meta (for
329
- Google search results) and in your feed.xml site description.
330
- baseurl: null # the subpath of your site, e.g. /blog
331
- url: null # the base hostname & protocol for your site, e.g. http://example.com
332
- twitter_username: bamr87
333
- github_username: bamr87
334
- ```
335
-
336
- <!-- TODO: add favicon instructions for branding -->
337
-
338
- ```shell
339
- cd $ZREPO
340
- wget https://raw.githubusercontent.com/bamr87/it-journey/master/favicon.ico
341
- ```
342
-
343
- ## Install Jekyll
344
-
345
- Install [jekyll](https://jekyllrb.com/docs/installation/)
346
-
347
- ```shell
348
- docker run jekyll new ./ --force
349
- bundle install
350
- ```
351
-
352
- ## Checkpoint - Jekyll Initialized
353
-
354
362
  ```shell
355
363
  code _config.yml
356
364
  ```
@@ -368,102 +376,6 @@ twitter_username: bamr87
368
376
  github_username: bamr87
369
377
  ```
370
378
 
371
- <!-- TODO: add favicon instructions for branding -->
372
-
373
- ```shell
374
- cd $ZREPO
375
- wget https://raw.githubusercontent.com/bamr87/it-journey/master/favicon.ico
376
- ```
377
-
378
- ## Checkpoint 1
379
-
380
- ```shell
381
-
382
- bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java
383
- ```
384
-
385
- ### Override default
386
- https://jekyllrb.com/docs/themes/#overriding-theme-defaults
387
-
388
- ```shell
389
- # find theme path
390
-
391
- bundle info --path minima
392
- JEKYLL_THEME=$(bundle info --path minima)
393
- echo $JEKYLL_THEME
394
- cd $JEKYLL_THEME
395
- ```
396
-
397
- ### Copy theme repo
398
-
399
- ```shell
400
- cp -aR $JEKYLL_THEME/* $ZREPO
401
- ```
402
-
403
- ### Remove Theme plugin
404
-
405
- ```shell
406
- bundle remove jekyll-theme-minima
407
- ```
408
-
409
- ### Comment out the theme from config and Gemfile
410
-
411
- ```shell
412
- #_config.yml
413
- # Build settings
414
- # theme: minima
415
- plugins:
416
- - jekyll-feed
417
- ```
418
-
419
- ```shell
420
- bundle remove minima --install
421
- ```
422
-
423
- Restart jekyll
424
- ```shell
425
- jekyll serve
426
- ```
427
-
428
- ## Building the theme
429
-
430
- ### Build default page
431
-
432
- ```shell
433
- {%- raw -%}
434
- cd $ZREPO
435
- mkdir _layout
436
- cd _layout
437
- echo "{{ content }}" >> default.html
438
- {% endraw %}
439
- ```
440
-
441
-
442
- ```shell
443
- #tree #alias #zshrc #profile
444
- alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
445
- echo alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" >> ~/.zshrc
446
-
447
- tree
448
- cd -
449
- ```
450
-
451
-
452
- ## Plant the seed
453
-
454
- ```shell
455
- # Set the date format
456
- d=$(date +%Y-%m-%d)
457
- echo "$d"
458
- ```
459
-
460
- ```shell
461
- # Download the seed page
462
- cd $ZREPO
463
- wget -O $d-zer0.md https://raw.githubusercontent.com/bamr87/it-journey/master/zer0.md
464
- ```
465
-
466
-
467
379
  ## Convert zer0.md to zer0.sh using Python
468
380
 
469
381
  ```python
@@ -500,3 +412,9 @@ def convert_md_to_files(md_file_path):
500
412
 
501
413
  convert_md_to_files('zer0.md')
502
414
  ```
415
+
416
+ ## Config file
417
+
418
+ ```yaml
419
+ {% include_relative _config.yml %}
420
+ ```
@@ -0,0 +1,221 @@
1
+ ---
2
+ layout: root
3
+ source: "https://getbootstrap.com/docs/5.3/examples/blog/#"
4
+ ---
5
+
6
+ <div class="container">
7
+ <header class="border-bottom lh-1 py-3">
8
+ <div class="row flex-nowrap justify-content-between align-items-center">
9
+ <div class="col-4 pt-1">
10
+ <a class="link-secondary" href="#">Subscribe</a>
11
+ </div>
12
+ <div class="col-4 text-center">
13
+ <a class="blog-header-logo text-body-emphasis text-decoration-none" href="#">{{ page.title }}</a>
14
+ </div>
15
+ <div class="col-4 d-flex justify-content-end align-items-center">
16
+ <a class="link-secondary" href="#" aria-label="Search">
17
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="mx-3" role="img" viewBox="0 0 24 24"><title>Search</title><circle cx="10.5" cy="10.5" r="7.5"/><path d="M21 21l-5.2-5.2"/></svg>
18
+ </a>
19
+ <a class="btn btn-sm btn-outline-secondary" href="#">Sign up</a>
20
+ </div>
21
+ </div>
22
+ </header>
23
+
24
+ <div class="nav-scroller py-1 mb-3 border-bottom">
25
+ <nav class="nav nav-underline justify-content-between">
26
+ <a class="nav-item nav-link link-body-emphasis active" href="#">World</a>
27
+ <a class="nav-item nav-link link-body-emphasis" href="#">U.S.</a>
28
+ <a class="nav-item nav-link link-body-emphasis" href="#">Technology</a>
29
+ <a class="nav-item nav-link link-body-emphasis" href="#">Business</a>
30
+ <a class="nav-item nav-link link-body-emphasis" href="#">Politics</a>
31
+ <a class="nav-item nav-link link-body-emphasis" href="#">Science</a>
32
+ <a class="nav-item nav-link link-body-emphasis" href="#">Travel</a>
33
+ </nav>
34
+ </div>
35
+ </div>
36
+
37
+ <main class="container">
38
+ <div class="p-4 p-md-5 mb-4 rounded text-body-emphasis bg-body-secondary">
39
+ <div class="col-lg-6 px-0">
40
+ <h1 class="display-4 fst-italic">Title of a longer featured blog post</h1>
41
+ <p class="lead my-3">Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.</p>
42
+ <p class="lead mb-0"><a href="#" class="text-body-emphasis fw-bold">Continue reading...</a></p>
43
+ </div>
44
+ </div>
45
+
46
+ <div class="row mb-2">
47
+ <div class="col-md-6">
48
+ <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
49
+ <div class="col p-4 d-flex flex-column position-static">
50
+ <strong class="d-inline-block mb-2 text-primary-emphasis">World</strong>
51
+ <h3 class="mb-0">Featured post</h3>
52
+ <div class="mb-1 text-body-secondary">Nov 12</div>
53
+ <p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
54
+ <a href="#" class="icon-link gap-1 icon-link-hover stretched-link">
55
+ Continue reading
56
+ <svg class="bi"><use xlink:href="#chevron-right"/></svg>
57
+ </a>
58
+ </div>
59
+ <div class="col-auto d-none d-lg-block">
60
+ <svg class="bd-placeholder-img" width="200" height="250" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Thumbnail" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#55595c"/><text x="50%" y="50%" fill="#eceeef" dy=".3em">Thumbnail</text></svg>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ <div class="col-md-6">
65
+ <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
66
+ <div class="col p-4 d-flex flex-column position-static">
67
+ <strong class="d-inline-block mb-2 text-success-emphasis">Design</strong>
68
+ <h3 class="mb-0">Post title</h3>
69
+ <div class="mb-1 text-body-secondary">Nov 11</div>
70
+ <p class="mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
71
+ <a href="#" class="icon-link gap-1 icon-link-hover stretched-link">
72
+ Continue reading
73
+ <svg class="bi"><use xlink:href="#chevron-right"/></svg>
74
+ </a>
75
+ </div>
76
+ <div class="col-auto d-none d-lg-block">
77
+ <svg class="bd-placeholder-img" width="200" height="250" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Thumbnail" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#55595c"/><text x="50%" y="50%" fill="#eceeef" dy=".3em">Thumbnail</text></svg>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+
83
+ <div class="row g-5">
84
+ <div class="col-md-8">
85
+ <h3 class="pb-4 mb-4 fst-italic border-bottom">
86
+ From the Firehose
87
+ </h3>
88
+
89
+ <article class="blog-post">
90
+ {{ content }}
91
+ </article>
92
+
93
+ <article class="blog-post">
94
+ <h2 class="display-5 link-body-emphasis mb-1">Another blog post</h2>
95
+ <p class="blog-post-meta">December 23, 2020 by <a href="#">Jacob</a></p>
96
+
97
+ <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p>
98
+ <blockquote>
99
+ <p>Longer quote goes here, maybe with some <strong>emphasized text</strong> in the middle of it.</p>
100
+ </blockquote>
101
+ <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p>
102
+ <h3>Example table</h3>
103
+ <p>And don't forget about tables in these posts:</p>
104
+ <table class="table">
105
+ <thead>
106
+ <tr>
107
+ <th>Name</th>
108
+ <th>Upvotes</th>
109
+ <th>Downvotes</th>
110
+ </tr>
111
+ </thead>
112
+ <tbody>
113
+ <tr>
114
+ <td>Alice</td>
115
+ <td>10</td>
116
+ <td>11</td>
117
+ </tr>
118
+ <tr>
119
+ <td>Bob</td>
120
+ <td>4</td>
121
+ <td>3</td>
122
+ </tr>
123
+ <tr>
124
+ <td>Charlie</td>
125
+ <td>7</td>
126
+ <td>9</td>
127
+ </tr>
128
+ </tbody>
129
+ <tfoot>
130
+ <tr>
131
+ <td>Totals</td>
132
+ <td>21</td>
133
+ <td>23</td>
134
+ </tr>
135
+ </tfoot>
136
+ </table>
137
+
138
+ <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p>
139
+ </article>
140
+
141
+ <article class="blog-post">
142
+ <h2 class="display-5 link-body-emphasis mb-1">New feature</h2>
143
+ <p class="blog-post-meta">December 14, 2020 by <a href="#">Chris</a></p>
144
+
145
+ <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p>
146
+ <ul>
147
+ <li>First list item</li>
148
+ <li>Second list item with a longer description</li>
149
+ <li>Third list item to close it out</li>
150
+ </ul>
151
+ <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p>
152
+ </article>
153
+
154
+ <nav class="blog-pagination" aria-label="Pagination">
155
+ <a class="btn btn-outline-primary rounded-pill" href="#">Older</a>
156
+ <a class="btn btn-outline-secondary rounded-pill disabled" aria-disabled="true">Newer</a>
157
+ </nav>
158
+
159
+ </div>
160
+
161
+ <div class="col-md-4">
162
+ <div class="position-sticky" style="top: 2rem;">
163
+ <div class="p-4 mb-3 bg-body-tertiary rounded">
164
+ <h4 class="fst-italic">About</h4>
165
+ <p class="mb-0">Customize this section to tell your visitors a little bit about your publication, writers, content, or something else entirely. Totally up to you.</p>
166
+ </div>
167
+
168
+ <div>
169
+ <h4 class="fst-italic">Recent posts</h4>
170
+ <ul class="list-unstyled">
171
+ {% for post in site.posts limit:3 %}
172
+ <li>
173
+ <a class="d-flex flex-column flex-lg-row gap-3 align-items-start align-items-lg-center py-3 link-body-emphasis text-decoration-none border-top" href="{{ post.url }}">
174
+ <img class="bd-placeholder-img" src="{{ page.preview | default: site.og_image }}" width="100%" height="96" alt="Preview image">
175
+ <div class="col-lg-8">
176
+ <h6 class="mb-0">{{ post.title }}</h6>
177
+ <small class="text-body-secondary">{{ post.date | date: "%B %d, %Y" }}</small>
178
+ </div>
179
+ </a>
180
+ </li>
181
+ {% endfor %}
182
+ </ul>
183
+ </div>
184
+
185
+ <div class="p-4">
186
+ <h4 class="fst-italic">Archives</h4>
187
+ <ol class="list-unstyled mb-0">
188
+ <li><a href="#">March 2021</a></li>
189
+ <li><a href="#">February 2021</a></li>
190
+ <li><a href="#">January 2021</a></li>
191
+ <li><a href="#">December 2020</a></li>
192
+ <li><a href="#">November 2020</a></li>
193
+ <li><a href="#">October 2020</a></li>
194
+ <li><a href="#">September 2020</a></li>
195
+ <li><a href="#">August 2020</a></li>
196
+ <li><a href="#">July 2020</a></li>
197
+ <li><a href="#">June 2020</a></li>
198
+ <li><a href="#">May 2020</a></li>
199
+ <li><a href="#">April 2020</a></li>
200
+ </ol>
201
+ </div>
202
+
203
+ <div class="p-4">
204
+ {% include sidebar-categories.html %}
205
+ </div>
206
+
207
+ <div class="p-4">
208
+ <h4 class="fst-italic">Elsewhere</h4>
209
+ <ol class="list-unstyled">
210
+ <li><a href="#">GitHub</a></li>
211
+ <li><a href="#">Twitter</a></li>
212
+ <li><a href="#">Facebook</a></li>
213
+ </ol>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ </div>
218
+
219
+ </main>
220
+
221
+
@@ -0,0 +1,18 @@
1
+ ---
2
+ layout: root
3
+ ---
4
+
5
+ <!-- Left Sidebar for Outline - Offcanvas -->
6
+ <!-- _includes/sidebar-left.html -->
7
+ <div class="offcanvas">
8
+ {% include sidebar-left.html %}
9
+ </div>
10
+ <div class="container-xl pt-5">
11
+
12
+ {{ content }}
13
+ </div>
14
+
15
+ <!-- Features -->
16
+ <!-- particles.js -->
17
+ <script src="/assets/js/particles-source.js"></script>
18
+ <script src="/assets/js/particles.js"></script>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-zer0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-10 00:00:00.000000000 Z
11
+ date: 2024-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -95,12 +95,14 @@ files:
95
95
  - _includes/toc
96
96
  - _includes/toc.html
97
97
  - _includes/zer0-env-var.html
98
+ - _layouts/blog.html
98
99
  - _layouts/collection.html
99
100
  - _layouts/default.html
100
101
  - _layouts/home.html
101
102
  - _layouts/index.html
102
103
  - _layouts/javascript.html
103
104
  - _layouts/journals.html
105
+ - _layouts/landing.html
104
106
  - _layouts/root.html
105
107
  - _sass/custom.scss
106
108
  - _sass/it-journey/_docs.scss