jekyll-theme-zer0 0.1.0
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +499 -0
- data/_includes/branding.html +43 -0
- data/_includes/breadcrumbs.html +31 -0
- data/_includes/dev-shortcuts.html +57 -0
- data/_includes/footer.html +57 -0
- data/_includes/giscus.html +16 -0
- data/_includes/google-analytics.html +9 -0
- data/_includes/google-tag-manager-body.html +8 -0
- data/_includes/google-tag-manager-head.html +10 -0
- data/_includes/halfmoon.html +35 -0
- data/_includes/head.html +95 -0
- data/_includes/header.html +79 -0
- data/_includes/info-section.html +33 -0
- data/_includes/intro.html +27 -0
- data/_includes/js-cdn.html +24 -0
- data/_includes/nav_list.html +63 -0
- data/_includes/navbar.html +34 -0
- data/_includes/powered-by.html +22 -0
- data/_includes/quick-index.html +17 -0
- data/_includes/searchbar.html +10 -0
- data/_includes/seo.html +131 -0
- data/_includes/sidebar-categories.html +21 -0
- data/_includes/sidebar-folders.html +107 -0
- data/_includes/sidebar-left.html +41 -0
- data/_includes/sidebar-right.html +47 -0
- data/_includes/sitemap.html +123 -0
- data/_includes/style.html +1574 -0
- data/_includes/svg.html +81 -0
- data/_includes/toc +7 -0
- data/_includes/toc.html +182 -0
- data/_includes/zer0-env-var.html +88 -0
- data/_layouts/collection.html +42 -0
- data/_layouts/default.html +37 -0
- data/_layouts/home.html +16 -0
- data/_layouts/index.html +8 -0
- data/_layouts/javascript.html +8 -0
- data/_layouts/journals.html +41 -0
- data/_layouts/root.html +54 -0
- data/_sass/custom.scss +331 -0
- data/_sass/it-journey/_docs.scss +3219 -0
- data/_sass/it-journey/_syntax.scss +342 -0
- data/_sass/it-journey/_theme.scss +247 -0
- data/_sass/it-journey/_variables.scss +521 -0
- data/_sass/it-journey/code-copy.scss +105 -0
- data/assets/.DS_Store +0 -0
- data/assets/css/custom.css +120 -0
- data/assets/css/main.scss +22 -0
- data/assets/images/favicon_gpt_computer_retro.png +0 -0
- data/assets/images/gravatar-small.png +0 -0
- data/assets/images/gravatar.png +0 -0
- data/assets/images/info-banner-mountain-wizard.png +0 -0
- data/assets/images/wizard-on-journey.png +0 -0
- data/assets/images/zer0-checkpoint-1.png +0 -0
- data/assets/images/zer0-checkpoint-2.png +0 -0
- data/assets/js/auto-hide-nav.js +18 -0
- data/assets/js/back-to-top.js +24 -0
- data/assets/js/cheetsheet.js +73 -0
- data/assets/js/code-copy.js +27 -0
- data/assets/js/color-modes.js +80 -0
- data/assets/js/docs.min.js +1 -0
- data/assets/js/halfmoon.js +80 -0
- data/assets/js/myScript.js +12 -0
- data/assets/js/nanobar.min.js +1 -0
- data/assets/js/particles-source.js +888 -0
- data/assets/js/particles.js +133 -0
- data/assets/js/side-bar-folders.js +12 -0
- data/assets/particles.json +110 -0
- metadata +153 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 48724f4541b496becb3260aa66953b9ce6132a2a2071d6f8afd5ded827c01af4
|
|
4
|
+
data.tar.gz: a4b39d428f375d5525bb4ef3d1395307a854042f5b330eeda3f9aa77b8111e90
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d3e2e3852968fbdc9a8722a4af2aaae5eaa7577570164df2f906f603290bd3231df256b973e935dbc1a88e56b631dbbbd4aa2fdffd60106f5ffedd0aee450422
|
|
7
|
+
data.tar.gz: f600e3f528d884acd943fae806e80fd62ca3e805b53e772e3a5e56bbdf3a79ee31dd7e7d815872570f7d6d5901da15a439cfa81619228c74f4cb034025b54662
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Amr
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: zer0
|
|
3
|
+
sub-title: 2 her0
|
|
4
|
+
description: Seed page with scripts, commands, instructions to build the most epic statically generated website in the universe.
|
|
5
|
+
version: 0.0.9
|
|
6
|
+
tags:
|
|
7
|
+
- jekyll
|
|
8
|
+
- bootstrap5
|
|
9
|
+
- javascript
|
|
10
|
+
- docker
|
|
11
|
+
categories:
|
|
12
|
+
- bootstrap
|
|
13
|
+
- quickstart
|
|
14
|
+
created: 2024-02-10T23:51:11.480Z
|
|
15
|
+
lastmod: 2024-05-27T04:50:51.594Z
|
|
16
|
+
draft: draft
|
|
17
|
+
layout: journals
|
|
18
|
+
sidebar:
|
|
19
|
+
nav: dynamic
|
|
20
|
+
permalink: /zer0/
|
|
21
|
+
slug: zer0
|
|
22
|
+
keywords:
|
|
23
|
+
- jekyll
|
|
24
|
+
- bootstrap5
|
|
25
|
+
- javascript
|
|
26
|
+
- docker
|
|
27
|
+
- zer0
|
|
28
|
+
date: 2024-05-27T04:49:32.883Z
|
|
29
|
+
snippet: What is a snippet?
|
|
30
|
+
comments: true
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
This is the seed of the project with all the commands, scripts, and instructions that build this application from the ground up.
|
|
34
|
+
In theory, this should be the only file you need to build the project from scratch.
|
|
35
|
+
However, in practice, you may need to install additional dependencies or configure the environment to match the target system.
|
|
36
|
+
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
|
+
Therefore, part of this document is to provide a list of prerequisites and setup instructions to help you get started with the project.
|
|
38
|
+
|
|
39
|
+
## {{ page.title }} Version {{ page.version }}
|
|
40
|
+
|
|
41
|
+
## System Specs
|
|
42
|
+
|
|
43
|
+
For my development machine, I use the following specs:
|
|
44
|
+
|
|
45
|
+
- Model Name: MacBook Pro
|
|
46
|
+
- Model Identifier: Mac15,6
|
|
47
|
+
- Model Number: MRX33LL/A
|
|
48
|
+
- Chip: Apple M3 Pro
|
|
49
|
+
- System Firmware Version: 10151.101.3
|
|
50
|
+
- System Version: macOS 14.4.1 (23E224)
|
|
51
|
+
- Kernel Version: Darwin 23.4.0
|
|
52
|
+
|
|
53
|
+
Inspect the page to see the hidden code to populate your system specs for a MacBook pro. Press (cmd + shift + c) in the browser.
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
# Get specific hardware and software information for Macs
|
|
57
|
+
|
|
58
|
+
system_profiler SPHardwareDataType | awk '/Model Name:|Model Identifier:|Model Number:|Chip:|System Firmware Version:/ {print $0}'
|
|
59
|
+
system_profiler SPSoftwareDataType | awk '/System Version:|Kernel Version:/ {print $0}'
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
{: .d-none }
|
|
63
|
+
|
|
64
|
+
## Prerequisites
|
|
65
|
+
|
|
66
|
+
Before we begin, make sure you have the following software installed on your machine:
|
|
67
|
+
|
|
68
|
+
- [VS code](https://code.visualstudio.com/) installed on your machine (if you're smart)
|
|
69
|
+
- [docker](https://docs.docker.com/get-docker/) installed on your machine (if you're a pro)
|
|
70
|
+
- [homebrew](https://brew.sh/) installed on your machine (if you're a cli junkie)
|
|
71
|
+
- [git](https://git-scm.com/) installed on your machine (if you want to track the truth)
|
|
72
|
+
- [gh cli](https://cli.github.com/) installed on your machine (if you want to publish the truth)
|
|
73
|
+
|
|
74
|
+
For step-by-step instructions on how to install these tools, visit the "Quickstart" section of the site here: [Quickstart](/quickstart)
|
|
75
|
+
|
|
76
|
+
To use these tools effectively, you need:
|
|
77
|
+
|
|
78
|
+
- A GitHub account and a repository where you want to maintain and publish your site.
|
|
79
|
+
- A personal access token from GitHub to authenticate with the GitHub API.
|
|
80
|
+
- A cup of coffee or your favorite beverage to keep you energized.
|
|
81
|
+
- A positive attitude and a sense of curiosity.
|
|
82
|
+
- A sense of adventure and a willingness to explore new tools and technologies.
|
|
83
|
+
- A growth mindset and a willingness to embrace challenges and learn from mistakes.
|
|
84
|
+
- A sense of humor and the ability to laugh at unexpected errors and bugs.
|
|
85
|
+
- A supportive community or network of friends and colleagues to ask for help and share your progress.
|
|
86
|
+
- A clear goal and motivation to build this project and share your knowledge with the world.
|
|
87
|
+
- A spirit of creativity and a desire to express yourself through code and technology.
|
|
88
|
+
|
|
89
|
+
More importantly, you need to:
|
|
90
|
+
|
|
91
|
+
- Embrace responsibility and ethical, inclusive software development.
|
|
92
|
+
- Cultivate empathy and create tools that benefit others.
|
|
93
|
+
- Appreciate opportunities and resources for learning and growth.
|
|
94
|
+
- Foster curiosity about AI and machine learning.
|
|
95
|
+
- Pursue a purpose that enhances productivity and creativity.
|
|
96
|
+
- Persevere through challenges with determination.
|
|
97
|
+
- Learn from others and share knowledge with humility.
|
|
98
|
+
- Believe in technology's potential to improve lives and create positive change.
|
|
99
|
+
- Make the learning process fun and engaging.
|
|
100
|
+
- Balance work with breaks for well-being.
|
|
101
|
+
- Celebrate achievements and share your work with the world.
|
|
102
|
+
- Anticipate making a difference in the developer community.
|
|
103
|
+
- Find satisfaction and fulfillment in creating value for others.
|
|
104
|
+
- Connect with the global community of developers and creators.
|
|
105
|
+
- Believe in your ability to create something meaningful and impactful.
|
|
106
|
+
- Stand in awe of technology's power to transform ideas into reality.
|
|
107
|
+
|
|
108
|
+
## Confirm Prerequisites
|
|
109
|
+
|
|
110
|
+
Make sure you have the following installed on your machine:
|
|
111
|
+
|
|
112
|
+
```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
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Environment
|
|
122
|
+
|
|
123
|
+
### Set your own environment variables
|
|
124
|
+
|
|
125
|
+
{% if site.level == 'her0' %}
|
|
126
|
+
{% include zer0-env-var.html %}
|
|
127
|
+
{% endif %}
|
|
128
|
+
|
|
129
|
+
### Set the default environment variables
|
|
130
|
+
|
|
131
|
+
```shell
|
|
132
|
+
# Or use the following to set the environment variables
|
|
133
|
+
|
|
134
|
+
export GITHOME=~/github
|
|
135
|
+
export GHUSER=bamr87
|
|
136
|
+
export GIT_REPO=zer0-mistakes
|
|
137
|
+
export ZREPO=$GITHOME/$GIT_REPO
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Add the environment variables to your shell profile (optional)
|
|
141
|
+
|
|
142
|
+
```shell
|
|
143
|
+
#open Code to edit your shell profile and copy the environment variables
|
|
144
|
+
|
|
145
|
+
code ~/.zprofile
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
```shell
|
|
149
|
+
# Confirm the environment variables by echoing them
|
|
150
|
+
|
|
151
|
+
echo $GITHOME # /Users/bamr87/github
|
|
152
|
+
echo $GHUSER # bamr87
|
|
153
|
+
echo $GIT_REPO # zer0-mistakes
|
|
154
|
+
echo $ZREPO # /Users/bamr87/github/zer0-mistakes
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Set your Git email and name
|
|
158
|
+
|
|
159
|
+
```shell
|
|
160
|
+
# Set your Git email and name to tag your commits
|
|
161
|
+
|
|
162
|
+
git config --global user.email "$GHUSER@users.noreply.github.com"
|
|
163
|
+
git config --global user.name "$GHUSER"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Set your GitHub email using ID (optional)
|
|
167
|
+
|
|
168
|
+
See [here](https://github.com/settings/emails) for details.
|
|
169
|
+
|
|
170
|
+
```shell
|
|
171
|
+
# If you didnt already set it in the previous step
|
|
172
|
+
# FIXME: quotes in comments dont work
|
|
173
|
+
|
|
174
|
+
echo "What is your Github ID?"
|
|
175
|
+
read GIT_ID
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
```shell
|
|
179
|
+
# Set your email using ID
|
|
180
|
+
|
|
181
|
+
git config --global user.email "$GIT_ID+$GHUSER@users.noreply.github.com"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```shell
|
|
185
|
+
# confirm your email
|
|
186
|
+
|
|
187
|
+
git config -l
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Initialize your new github repository
|
|
191
|
+
|
|
192
|
+
[gh cli docs](https://cli.github.com/manual/)
|
|
193
|
+
|
|
194
|
+
```shell
|
|
195
|
+
# Create your github home directory and repo
|
|
196
|
+
|
|
197
|
+
mkdir -p $ZREPO
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
```shell
|
|
201
|
+
# Initialize your github repository
|
|
202
|
+
|
|
203
|
+
gh repo create $GIT_REPO --gitignore Jekyll -l mit --public
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
```shell
|
|
207
|
+
# If new repo, initialize it
|
|
208
|
+
|
|
209
|
+
cd $ZREPO
|
|
210
|
+
git init
|
|
211
|
+
git remote add origin https://github.com/${GHUSER}/${GIT_REPO}.git
|
|
212
|
+
git pull origin main
|
|
213
|
+
curl https://raw.githubusercontent.com/bamr87/it-journey/master/zer0.md > README.md
|
|
214
|
+
git add README.md
|
|
215
|
+
git commit -m "Init zer0-mistakes"
|
|
216
|
+
git branch -M main
|
|
217
|
+
git push -u origin main
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Checkpoint - Github Repo Initialized
|
|
221
|
+
|
|
222
|
+
Go to your new github repository.
|
|
223
|
+
|
|
224
|
+
```shell
|
|
225
|
+
# Open your new github repository in the browser
|
|
226
|
+
|
|
227
|
+
open https://github.com/${GHUSER}/${GIT_REPO}
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
<a id="repo-link"></a>
|
|
232
|
+
|
|
233
|
+

|
|
234
|
+
|
|
235
|
+
## Initialize Jekyll
|
|
236
|
+
|
|
237
|
+
### Create Gemfile
|
|
238
|
+
|
|
239
|
+
```shell
|
|
240
|
+
# Create a new Gemfile
|
|
241
|
+
cd $ZREPO
|
|
242
|
+
touch Gemfile
|
|
243
|
+
|
|
244
|
+
# Write the non-commented lines to the Gemfile
|
|
245
|
+
echo 'source "https://rubygems.org"' >> Gemfile
|
|
246
|
+
echo "gem 'github-pages' , '231'" >> Gemfile
|
|
247
|
+
echo "gem 'jekyll' , '3.9.5'" >> Gemfile
|
|
248
|
+
echo "group :jekyll_plugins do" >> Gemfile
|
|
249
|
+
echo " gem 'jekyll-feed', \"~> 0.17\"" >> Gemfile
|
|
250
|
+
echo " gem 'jekyll-sitemap' , \"~> 1.4.0\"" >> Gemfile
|
|
251
|
+
echo " gem 'jekyll-seo-tag', \"~> 2.8.0\"" >> Gemfile
|
|
252
|
+
echo " gem 'jekyll-paginate', '~> 1.1'" >> Gemfile
|
|
253
|
+
echo "end" >> Gemfile
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Create Dockerfile
|
|
257
|
+
|
|
258
|
+
```shell
|
|
259
|
+
# Create a new Dockerfile
|
|
260
|
+
cd $ZREPO
|
|
261
|
+
touch Dockerfile
|
|
262
|
+
|
|
263
|
+
# Write the content to the Dockerfile
|
|
264
|
+
echo "# Use an official Ruby runtime as a parent image" >> Dockerfile
|
|
265
|
+
echo "FROM ruby:2.7.4" >> Dockerfile
|
|
266
|
+
echo "# escape=\\" >> Dockerfile
|
|
267
|
+
echo "ENV GITHUB_GEM_VERSION 231" >> Dockerfile
|
|
268
|
+
echo "ENV JSON_GEM_VERSION 1.8.6" >> Dockerfile
|
|
269
|
+
echo "ENV GIT_REPO ${GIT_REPO}" >> Dockerfile
|
|
270
|
+
echo "WORKDIR /app" >> Dockerfile
|
|
271
|
+
echo "ADD . /app" >> Dockerfile
|
|
272
|
+
echo "RUN gem update --system 3.3.22" >> Dockerfile
|
|
273
|
+
echo "RUN bundle update" >> Dockerfile
|
|
274
|
+
echo "RUN bundle install" >> Dockerfile
|
|
275
|
+
echo "RUN bundle clean --force" >> Dockerfile
|
|
276
|
+
echo "EXPOSE 4000" >> Dockerfile
|
|
277
|
+
echo 'CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"]' >> Dockerfile
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
```shell
|
|
281
|
+
# build the docker image based on the Dockerfile
|
|
282
|
+
docker build -t ${GIT_REPO} .
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
```shell
|
|
286
|
+
# Run the container in detached mode
|
|
287
|
+
docker run -d -p 4000:4000 -v ${ZREPO}:/app --name zer0_container ${GIT_REPO}
|
|
288
|
+
|
|
289
|
+
# Start the container and run the CMD line from the Dockerfile
|
|
290
|
+
docker start zer0_container
|
|
291
|
+
|
|
292
|
+
# Attach to the running container
|
|
293
|
+
docker exec -it zer0_container /bin/bash
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
## Checkpoint - Jekyll Initialized
|
|
297
|
+
|
|
298
|
+
```shell
|
|
299
|
+
open http://localhost:4000/
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+

|
|
303
|
+
|
|
304
|
+
## Install Jekyll
|
|
305
|
+
|
|
306
|
+
Install [jekyll](https://jekyllrb.com/docs/installation/)
|
|
307
|
+
|
|
308
|
+
```shell
|
|
309
|
+
jekyll new ./ --force
|
|
310
|
+
bundle install
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Checkpoint - Jekyll Initialized
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
```shell
|
|
317
|
+
code _config.yml
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
```yaml
|
|
321
|
+
title: zer0-mistakes
|
|
322
|
+
email: bamr87@zer0-mistakes.com
|
|
323
|
+
description: >- # this means to ignore newlines until "baseurl:"
|
|
324
|
+
Write an awesome description for your new site here. You can edit this
|
|
325
|
+
line in _config.yml. It will appear in your document head meta (for
|
|
326
|
+
Google search results) and in your feed.xml site description.
|
|
327
|
+
baseurl: null # the subpath of your site, e.g. /blog
|
|
328
|
+
url: null # the base hostname & protocol for your site, e.g. http://example.com
|
|
329
|
+
twitter_username: bamr87
|
|
330
|
+
github_username: bamr87
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
<!-- TODO: add favicon instructions for branding -->
|
|
334
|
+
|
|
335
|
+
```shell
|
|
336
|
+
cd $ZREPO
|
|
337
|
+
wget https://raw.githubusercontent.com/bamr87/it-journey/master/favicon.ico
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## Install Jekyll
|
|
341
|
+
|
|
342
|
+
Install [jekyll](https://jekyllrb.com/docs/installation/)
|
|
343
|
+
|
|
344
|
+
```shell
|
|
345
|
+
docker run jekyll new ./ --force
|
|
346
|
+
bundle install
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
## Checkpoint - Jekyll Initialized
|
|
350
|
+
|
|
351
|
+
```shell
|
|
352
|
+
code _config.yml
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
```yaml
|
|
356
|
+
title: zer0-mistakes
|
|
357
|
+
email: bamr87@zer0-mistakes.com
|
|
358
|
+
description: >- # this means to ignore newlines until "baseurl:"
|
|
359
|
+
Write an awesome description for your new site here. You can edit this
|
|
360
|
+
line in _config.yml. It will appear in your document head meta (for
|
|
361
|
+
Google search results) and in your feed.xml site description.
|
|
362
|
+
baseurl: null # the subpath of your site, e.g. /blog
|
|
363
|
+
url: null # the base hostname & protocol for your site, e.g. http://example.com
|
|
364
|
+
twitter_username: bamr87
|
|
365
|
+
github_username: bamr87
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
<!-- TODO: add favicon instructions for branding -->
|
|
369
|
+
|
|
370
|
+
```shell
|
|
371
|
+
cd $ZREPO
|
|
372
|
+
wget https://raw.githubusercontent.com/bamr87/it-journey/master/favicon.ico
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
## Checkpoint 1
|
|
376
|
+
|
|
377
|
+
```shell
|
|
378
|
+
|
|
379
|
+
bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Override default
|
|
383
|
+
https://jekyllrb.com/docs/themes/#overriding-theme-defaults
|
|
384
|
+
|
|
385
|
+
```shell
|
|
386
|
+
# find theme path
|
|
387
|
+
|
|
388
|
+
bundle info --path minima
|
|
389
|
+
JEKYLL_THEME=$(bundle info --path minima)
|
|
390
|
+
echo $JEKYLL_THEME
|
|
391
|
+
cd $JEKYLL_THEME
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Copy theme repo
|
|
395
|
+
|
|
396
|
+
```shell
|
|
397
|
+
cp -aR $JEKYLL_THEME/* $ZREPO
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### Remove Theme plugin
|
|
401
|
+
|
|
402
|
+
```shell
|
|
403
|
+
bundle remove jekyll-theme-minima
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Comment out the theme from config and Gemfile
|
|
407
|
+
|
|
408
|
+
```shell
|
|
409
|
+
#_config.yml
|
|
410
|
+
# Build settings
|
|
411
|
+
# theme: minima
|
|
412
|
+
plugins:
|
|
413
|
+
- jekyll-feed
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
```shell
|
|
417
|
+
bundle remove minima --install
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
Restart jekyll
|
|
421
|
+
```shell
|
|
422
|
+
jekyll serve
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
## Building the theme
|
|
426
|
+
|
|
427
|
+
### Build default page
|
|
428
|
+
|
|
429
|
+
```shell
|
|
430
|
+
{%- raw -%}
|
|
431
|
+
cd $ZREPO
|
|
432
|
+
mkdir _layout
|
|
433
|
+
cd _layout
|
|
434
|
+
echo "{{ content }}" >> default.html
|
|
435
|
+
{% endraw %}
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
```shell
|
|
440
|
+
#tree #alias #zshrc #profile
|
|
441
|
+
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
|
|
442
|
+
echo alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" >> ~/.zshrc
|
|
443
|
+
|
|
444
|
+
tree
|
|
445
|
+
cd -
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
## Plant the seed
|
|
450
|
+
|
|
451
|
+
```shell
|
|
452
|
+
# Set the date format
|
|
453
|
+
d=$(date +%Y-%m-%d)
|
|
454
|
+
echo "$d"
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
```shell
|
|
458
|
+
# Download the seed page
|
|
459
|
+
cd $ZREPO
|
|
460
|
+
wget -O $d-zer0.md https://raw.githubusercontent.com/bamr87/it-journey/master/zer0.md
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
## Convert zer0.md to zer0.sh using Python
|
|
465
|
+
|
|
466
|
+
```python
|
|
467
|
+
def convert_md_to_files(md_file_path):
|
|
468
|
+
language_files = {}
|
|
469
|
+
language_mode = None
|
|
470
|
+
language_extensions = {'python': '.py', 'shell': '.sh'}
|
|
471
|
+
shebang_lines = {'python': '#!/usr/bin/env python3\n', 'shell': '#!/bin/bash\n'}
|
|
472
|
+
|
|
473
|
+
with open(md_file_path, 'r') as md_file:
|
|
474
|
+
for line in md_file:
|
|
475
|
+
if line.startswith('```'):
|
|
476
|
+
if language_mode:
|
|
477
|
+
# End of a language block, switch back to markdown mode
|
|
478
|
+
language_mode = None
|
|
479
|
+
else:
|
|
480
|
+
# Start of a language block, open a new file for this language if not already open
|
|
481
|
+
language = line.strip('`\n')
|
|
482
|
+
if language in language_extensions:
|
|
483
|
+
language_mode = language
|
|
484
|
+
if language not in language_files:
|
|
485
|
+
language_file = open(md_file_path.replace('.md', language_extensions[language]), 'w')
|
|
486
|
+
if language in shebang_lines:
|
|
487
|
+
language_file.write(shebang_lines[language])
|
|
488
|
+
language_files[language] = language_file
|
|
489
|
+
continue
|
|
490
|
+
|
|
491
|
+
if language_mode:
|
|
492
|
+
language_files[language_mode].write(line)
|
|
493
|
+
|
|
494
|
+
# Close all open language files
|
|
495
|
+
for language_file in language_files.values():
|
|
496
|
+
language_file.close()
|
|
497
|
+
|
|
498
|
+
convert_md_to_files('zer0.md')
|
|
499
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
file: banding.html
|
|
3
|
+
path: _includes/branding.html
|
|
4
|
+
inclues: none
|
|
5
|
+
description:
|
|
6
|
+
-->
|
|
7
|
+
<!-- Color Schema Override
|
|
8
|
+
TODO: Add a poline plug-in to generate color scheme
|
|
9
|
+
https://meodai.github.io/poline/
|
|
10
|
+
|
|
11
|
+
primary: #a11111
|
|
12
|
+
main: #007bff
|
|
13
|
+
secondary: #6c757d
|
|
14
|
+
|
|
15
|
+
## Logo
|
|
16
|
+
Red - #a11111
|
|
17
|
+
Yellow - #ffe900
|
|
18
|
+
Teal - #376986
|
|
19
|
+
Blue - #007bff
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
<!-- Title Section -->
|
|
23
|
+
|
|
24
|
+
<div class="navbar-brand">
|
|
25
|
+
<a class="nav-link" href="{{ site.logo_link}}{{ page.url }}">
|
|
26
|
+
<i class="d-sm-inline d-md-none {{ site.default_icon }} {{ site.default_icon }}-{{ site.title_icon | default: site.powered_by.default }}" aria-hidden="true"></i>
|
|
27
|
+
<!-- display name if there's enough space, else icon only -->
|
|
28
|
+
<span class="d-none d-md-inline">
|
|
29
|
+
{{ site.title | default: site.title }}
|
|
30
|
+
</span>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="navbar-brand">
|
|
34
|
+
<!-- If a subtitle exsits -->
|
|
35
|
+
{%- if site.subtitle -%}
|
|
36
|
+
<a class="nav-link" href="http://localhost:{{ site.port }}{{ site.baseurl}}{{ page.url }}">
|
|
37
|
+
<i class="d-sm-inline d-md-none {{ site.default_icon }} {{ site.default_icon }}-{{ site.subtitle_icon | default: site.powered_by.default }}" aria-hidden="true"></i>
|
|
38
|
+
<span class="d-none d-md-inline">
|
|
39
|
+
{{ site.subtitle }}
|
|
40
|
+
</span>
|
|
41
|
+
</a>
|
|
42
|
+
{% endif %}
|
|
43
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Breadcrumsbs
|
|
2
|
+
file: breadcrumbs.html
|
|
3
|
+
path: _includes/breadcrumbs.html
|
|
4
|
+
TODO: Update to be read by Google Search Console "https://developers.google.com/search/docs/appearance/structured-data/breadcrumb"
|
|
5
|
+
-->
|
|
6
|
+
{% if page.url != "/" and site.breadcrumbs %}
|
|
7
|
+
{% unless paginator %}{% endunless %}
|
|
8
|
+
|
|
9
|
+
<nav class="breadcrumbs">
|
|
10
|
+
<ol itemscope itemtype="https://schema.org/BreadcrumbList">
|
|
11
|
+
<i class="bi bi-folder"></i>
|
|
12
|
+
{% assign crumbs = page.url | remove:'/index.html' | split: '/' %}
|
|
13
|
+
<a href="/">root</a>
|
|
14
|
+
{% for crumb in crumbs offset: 1 %}
|
|
15
|
+
{% if forloop.last %}
|
|
16
|
+
/ {{ page.title }}
|
|
17
|
+
{% else %}
|
|
18
|
+
/ <a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' }}{% endfor %}">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</a>
|
|
19
|
+
{% endif %}
|
|
20
|
+
{% endfor %}
|
|
21
|
+
</ol>
|
|
22
|
+
</nav>
|
|
23
|
+
<!-- Secret Search bar -->
|
|
24
|
+
<!-- Hidden
|
|
25
|
+
<form class="form-inline my-2 my-lg-0">
|
|
26
|
+
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
|
|
27
|
+
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
|
28
|
+
</form>
|
|
29
|
+
-->
|
|
30
|
+
|
|
31
|
+
{% endif %}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Title: Dev Shortcuts
|
|
3
|
+
Description: This file contains the dev shortcuts for the site.
|
|
4
|
+
file: dev-shortcuts.html
|
|
5
|
+
variables:
|
|
6
|
+
- site.repository
|
|
7
|
+
- site.default_icon
|
|
8
|
+
- site.collections_dir
|
|
9
|
+
- site.repository_name
|
|
10
|
+
- site.nav-file
|
|
11
|
+
- site.local_git_pc
|
|
12
|
+
- site.local_git_mac
|
|
13
|
+
- page.collection
|
|
14
|
+
- page_dir
|
|
15
|
+
- testvar
|
|
16
|
+
references:
|
|
17
|
+
- https://shopify.github.io/liquid/tags/variable/#capture
|
|
18
|
+
- https://getbootstrap.com/docs/5.3/components/collapse/
|
|
19
|
+
tutorial:
|
|
20
|
+
- https://jekyllcodex.org/without-plugin/hidden-settings/
|
|
21
|
+
- https://jekyllcodex.org/without-plugin/hidden-settings/#collapse-feature
|
|
22
|
+
-->
|
|
23
|
+
|
|
24
|
+
<!-- TODO: Article about the collapse feature in Bootstrap https://getbootstrap.com/docs/5.3/components/collapse/-->
|
|
25
|
+
<!-- TODO: Write tutorial on creating this hidden settings feature -->
|
|
26
|
+
|
|
27
|
+
<!-- Source Code Control Shortcuts - Page -->
|
|
28
|
+
<div class="container text-center">
|
|
29
|
+
|
|
30
|
+
{% if page.collection %}
|
|
31
|
+
{% capture page_dir %}{{ site.collections_dir }}{% endcapture %}
|
|
32
|
+
{% assign testvar = "collection exists" %}
|
|
33
|
+
{% endif %}
|
|
34
|
+
|
|
35
|
+
<!-- Source Code Control Shortcuts - Page -->
|
|
36
|
+
<a class="btn bg-primary" href="https://github.com/{{site.repository}}/blob/{{site.branch}}/{{ page_dir }}/{{page.path}}">
|
|
37
|
+
<i class="{{site.default_icon}} {{site.default_icon}}-github"></i>
|
|
38
|
+
<!-- https://icons.getbootstrap.com/icons/github/ -->
|
|
39
|
+
</a>
|
|
40
|
+
<a class="btn bg-primary" href="https://github.dev/{{site.repository}}/blob/{{site.branch}}/{{ page_dir }}/{{ page.path }}">
|
|
41
|
+
<i class="{{site.default_icon}} {{site.default_icon}}-cloud"></i>
|
|
42
|
+
<!-- https://icons.getbootstrap.com/icons/microsoft/ -->
|
|
43
|
+
</a>
|
|
44
|
+
|
|
45
|
+
<!-- Source Code Control Shortcuts - Site and Nav -->
|
|
46
|
+
|
|
47
|
+
<a class="btn bg-primary" href="vscode://file{{ site.local_git}}/{{ site.repository_name }}/{{ page_dir }}/{{ page.path }}">
|
|
48
|
+
<i class="{{site.default_icon}} {{site.default_icon}}-code"></i>
|
|
49
|
+
</a>
|
|
50
|
+
|
|
51
|
+
<!-- site config -->
|
|
52
|
+
<a class="btn bg-primary" href="https://github.com/{{site.repository}}/blob/{{site.branch}}/_config.yml">
|
|
53
|
+
<i class="bi bi-gear"></i>
|
|
54
|
+
<!-- https://icons.getbootstrap.com/icons/gear/ -->
|
|
55
|
+
</a>
|
|
56
|
+
|
|
57
|
+
</div>
|