Skip to content

Commit 62c8d5a

Browse files
authored
Updates: Chirpy theme, Embeddings
Updates: Chirpy theme, Embeddings Merge pull request #14 from iamwatchdogs/update - Update Chirpy theme version. - Added LinkedIn and Twitter Embedding templates. - Update Docs accordingly.
2 parents b9f79cd + 1649b9b commit 62c8d5a

File tree

140 files changed

+707
-9146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+707
-9146
lines changed

.devcontainer/devcontainer.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "Jekyll",
3+
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye",
4+
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
5+
"postCreateCommand": "bash .devcontainer/post-create.sh",
6+
"customizations": {
7+
"vscode": {
8+
"settings": {
9+
"terminal.integrated.defaultProfile.linux": "bash"
10+
},
11+
"extensions": [
12+
// Liquid tags auto-complete
13+
"killalau.vscode-liquid-snippets",
14+
// Liquid syntax highlighting and formatting
15+
"Shopify.theme-check-vscode",
16+
// Shell
17+
"timonwong.shellcheck",
18+
"mkhl.shfmt",
19+
// Common formatter
20+
"EditorConfig.EditorConfig",
21+
"esbenp.prettier-vscode",
22+
"stylelint.vscode-stylelint",
23+
"yzhang.markdown-all-in-one",
24+
// Git
25+
"mhutchie.git-graph"
26+
]
27+
}
28+
}
29+
}

.devcontainer/post-create.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
if [ -f package.json ]; then
4+
bash -i -c "nvm install --lts && nvm install-latest-npm"
5+
npm i
6+
npm run build
7+
fi
8+
9+
# Install dependencies for shfmt extension
10+
curl -sS https://webi.sh/shfmt | sh &>/dev/null
11+
12+
# Add OMZ plugins
13+
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
14+
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
15+
sed -i -E "s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~/.zshrc
16+
17+
# Avoid git log use less
18+
echo -e "\nunset LESS" >>~/.zshrc

.github/workflows/pages-deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ jobs:
3737

3838
- name: Setup Pages
3939
id: pages
40-
uses: actions/configure-pages@v3
40+
uses: actions/configure-pages@v4
4141

4242
- name: Setup Ruby
4343
uses: ruby/setup-ruby@v1
4444
with:
45-
ruby-version: 3
45+
ruby-version: 3.3
4646
bundler-cache: true
4747

4848
- name: Build site
@@ -53,11 +53,11 @@ jobs:
5353
- name: Test site
5454
run: |
5555
bundle exec htmlproofer _site \
56-
\-\-disable-external=true \
56+
\-\-disable-external \
5757
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
5858
5959
- name: Upload site artifact
60-
uses: actions/upload-pages-artifact@v1
60+
uses: actions/upload-pages-artifact@v3
6161
with:
6262
path: "_site${{ steps.pages.outputs.base_path }}"
6363

@@ -70,4 +70,4 @@ jobs:
7070
steps:
7171
- name: Deploy to GitHub Pages
7272
id: deployment
73-
uses: actions/deploy-pages@v2
73+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ package-lock.json
1717

1818
# IDE configurations
1919
.idea
20-
.vscode
20+
.vscode/*
21+
!.vscode/settings.json
22+
!.vscode/extensions.json
23+
!.vscode/tasks.json
2124

2225
# Misc
26+
_sass/vendors
2327
assets/js/dist

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["ms-vscode-remote.remote-containers"]
3+
}

.vscode/settings.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
// Prettier
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.formatOnSave": true,
5+
// Shopify Liquid
6+
"files.associations": {
7+
"*.html": "liquid"
8+
},
9+
"[markdown]": {
10+
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
11+
},
12+
// Formatter
13+
"[html][liquid]": {
14+
"editor.defaultFormatter": "Shopify.theme-check-vscode"
15+
},
16+
"[shellscript]": {
17+
"editor.defaultFormatter": "mkhl.shfmt"
18+
},
19+
// Disable vscode built-in stylelint
20+
"css.validate": false,
21+
"scss.validate": false,
22+
"less.validate": false,
23+
// Stylint extension settings
24+
"stylelint.snippet": ["css", "scss"],
25+
"stylelint.validate": ["css", "scss"],
26+
// Run tasks in macOS
27+
"terminal.integrated.profiles.osx": {
28+
"zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] }
29+
}
30+
}

.vscode/tasks.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Run Jekyll Server",
6+
"type": "shell",
7+
"command": "./tools/run.sh",
8+
"group": {
9+
"kind": "build",
10+
"isDefault": true
11+
},
12+
"problemMatcher": [],
13+
"detail": "Runs the Jekyll server with live reload."
14+
},
15+
{
16+
"label": "Build Jekyll Site",
17+
"type": "shell",
18+
"command": "./tools/test.sh",
19+
"group": {
20+
"kind": "build"
21+
},
22+
"problemMatcher": [],
23+
"detail": "Build the Jekyll site for production."
24+
}
25+
]
26+
}

Gemfile

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,13 @@
22

33
source "https://rubygems.org"
44

5-
gem "jekyll-theme-chirpy", "~> 6.2", ">= 6.2.2"
5+
gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.4"
66

7-
group :test do
8-
gem "html-proofer", "~> 4.4"
9-
end
7+
gem "html-proofer", "~> 5.0", group: :test
108

11-
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
12-
# and associated library.
139
platforms :mingw, :x64_mingw, :mswin, :jruby do
1410
gem "tzinfo", ">= 1", "< 3"
1511
gem "tzinfo-data"
1612
end
1713

18-
# Performance-booster for watching directories on Windows
19-
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
20-
21-
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
22-
# do not have a Java counterpart.
23-
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
24-
25-
# Lock jekyll-sass-converter to 2.x on Linux-musl
26-
if RUBY_PLATFORM =~ /linux-musl/
27-
gem "jekyll-sass-converter", "~> 2.0"
28-
end
14+
gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin]

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ With Notebook, you can easily contribute to technical content and gain valuable
3434

3535
Hey there, fellow developer !!!... I'm happy to see you intrested in contributing to this open source project. Since, this project is an open notebook for everyone, you're always welcome to make your techinal writing contribution by writing you own blog, tip & trick, documentation and much more. All you have to do is write down your content in `markdown` *(just like how wrote this README.md file)* and place those file within `_posts` directory.
3636

37-
> First time ???... Then I highly recommend you to check out [CONTRIBUTING.md](CONTRIBUTING.md "goto CONTRIBUTING.md").
37+
> First time ???... Then I highly recommend you to check out [CONTRIBUTING.md](docs/CONTRIBUTING.md "goto CONTRIBUTING.md").
3838
39-
- **Step 1:** Make sure you install the required dependencies like `Ruby`, `bundler` and `Jekyll` framework. Installation varies from platform to platform, so make sure to check out the [CONTRIBUTING.md](CONTRIBUTING.md "goto CONTRIBUTING.md").
39+
- **Step 1:** Setting up development environment. Refer to [CONTRIBUTING.md](docs/CONTRIBUTING.md "goto CONTRIBUTING.md") that guide you to setup the required evironment for the project.
4040

41-
- **Step 2:** After installing the required dependencies, [fork](https://github.com/Grow-with-Open-Source/Notebook/fork "Let's fork this repo") this repository and clone it in your local system, using the following command:
41+
- **Step 2:** After setting up environment, [fork](https://github.com/Grow-with-Open-Source/Notebook/fork "Let's fork this repo") this repository and clone it in your local system, using the following command:
4242
```bash
4343
git clone https://github.com/<your-github-profile>/Notebook.git
4444
```
@@ -80,7 +80,7 @@ unique_key_value:
8080
```yml
8181
shamith_watchdogs:
8282
name: Shamith Nakka
83-
twitter: Shamith29188225
83+
twitter: shamith_nakka
8484
url: https://github.com/iamwatchdogs/
8585
```
8686
@@ -90,15 +90,16 @@ shamith_watchdogs:
9090
9191
- **Step 6:** Now to the actual task, Create a new markdown file with `YYYY-MM_DD-your-post-name.md` *(make sure your post name is in small letters and separated by single dash)* within the [`_post`](/tree/main/_posts/) directory.
9292

93-
- **Step 7:** Each and every markdown file that you have created for content writing should contain the following meta data (or) config:
93+
- **Step 7:** Each and every markdown file that you have created for content writing should contain the following meta data called `Front Matter
94+
`:
9495
```md
9596
---
9697
title: <title>
9798
date: YYYY-MM-DD HH:MM:SS +/-TTTT
9899
categories: [<main_categories>, <sub_categories_1>, ..., <sub_categories_n>]
99100
tags: [<tag_1>, ..., <tag_n>]
100101
author: <respective_author_key_value>
101-
img_path: "/assets/img/<your_img_directory_name>/"
102+
media_subpath: "/assets/img/<your_img_directory_name>/"
102103
image:
103104
path: <name_of_the_img_for_page_cover>
104105
alt: <alternative_text>
@@ -118,7 +119,7 @@ date: 2023-09-21 20:34:00 +0530
118119
categories: [Welcome, Guide]
119120
tags: [introduction]
120121
author: shamith_watchdogs
121-
img_path: "/assets/img/welcome-page/"
122+
media_subpath: "/assets/img/welcome-page"
122123
image:
123124
path: "welcome-img.jpg"
124125
alt: "Welcome Page"
@@ -132,10 +133,10 @@ image:
132133

133134
> [!NOTE]
134135
> - Note that the `+/-TTTT` in the `date` section refers the **UTC offset**. You can find your **UTC offset** value by searching for your country in the [list of UTC](https://en.wikipedia.org/wiki/List_of_UTC_offsets "Goto List of UTC offsets"). And if you're from India, you can use the above UTC offset from the example.
135-
> - Also not that `img_path` and `image` *(including its sub attributes)* are optional and only need when you're going to add images to your post.
136+
> - Also not that `media_subpath` and `image` *(including its sub attributes)* are optional and only need when you're going to add images to your post.
136137
> - If there are more than one person working on a single post use `authors` attribute instead of `author`. And the input for the `authors` attribute will be a list of key of authors specified within the [`authors.yml`](_data/authors.yml) file.
137138

138-
- **Step 8:** Now, you can proceed to write your technical content. And if you have any images that are part of your technical writing, then create a new directory using your post's name within `assets/img` directory as `assets/img/<your-post-name>`. Now add your images to your folder. After adding images to your folder, don't forget to add location to `img_path` attribute as `img_path: ../../assets/img/<your-post-name>`. Now, you can directly access your images with specifying full relative path.
139+
- **Step 8:** Now, you can proceed to write your technical content. And if you have any images that are part of your technical writing, then create a new directory using your post's name within `assets/img` directory as `assets/img/<your-post-name>`. Now add your images to your folder. After adding images to your folder, don't forget to add location to `media_subpath` attribute as `media_subpath: ../../assets/img/<your-post-name>`. Now, you can directly access your images with specifying full relative path.
139140

140141
> [!NOTE]
141142
> It's highly suggested to use CDN links for images. But if you could not for any reason, then you can proceed with above process.

0 commit comments

Comments
 (0)