From 150e4a31a28375064e82272c0af77385f6885668 Mon Sep 17 00:00:00 2001 From: Deep0Thinking Date: Tue, 23 Jan 2024 04:48:08 -0800 Subject: [PATCH] Add new post, update site header, and fix styling issues --- .github/workflows/jekyll.yml | 56 ++++---- Gemfile.lock | 57 ++++++++- README.md | 2 +- _posts/2022-11-28-How-to-post-posts.md | 94 +++++++++----- _posts/2024-01-20-My-first-post.md | 10 ++ _site/2022/11/28/How-to-post-posts.html | 163 ++++++++++++++++-------- _site/2024/01/20/My-first-post.html | 95 ++++++++++++++ _site/README.md | 62 +++++---- _site/about.html | 42 +++--- _site/all-tags.html | 30 ++--- _site/archive.html | 68 +++++----- _site/assets/css/style.css | 9 +- _site/assets/css/style.css.map | 2 +- _site/assets/js/custom-styles.js | 52 ++++++-- _site/index.html | 59 +++++---- _site/tag/WoW.html | 91 +++++++++---- _site/tag/go.html | 91 +++++++++---- _site/tag/let's.html | 66 ++++++---- _site/tag/this-is-a-tag.html | 66 ++++++---- _site/tagpage.html | 31 ++--- about.md | 13 +- archive.md | 38 +++--- 22 files changed, 780 insertions(+), 417 deletions(-) create mode 100644 _posts/2024-01-20-My-first-post.md create mode 100644 _site/2024/01/20/My-first-post.html diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 4d234c3..2c62227 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -4,15 +4,14 @@ # documentation. # Sample workflow for building and deploying a Jekyll site to GitHub Pages - -name: Deploy Jekyll site to "_site" branch on GitHub Pages +name: Deploy Jekyll site to Pages on: # Runs on pushes targeting the default branch push: branches: ["main"] - paths: - - "_site/**" # Runs only when there are changes in the 'site' directory + paths-ignore: + - "_site/**" pull_request: branches: ["main"] paths: @@ -23,7 +22,7 @@ on: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: - contents: write + contents: read pages: write id-token: write @@ -46,11 +45,17 @@ jobs: ruby-version: "3.1" # Not needed with a .ruby-version file bundler-cache: true # runs 'bundle install' and caches installed gems automatically cache-version: 0 # Increment this number if you need to re-download cached gems + - name: Setup Pages + id: pages + uses: actions/configure-pages@v4 - name: Build with Jekyll # Outputs to the './_site' directory by default run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" env: JEKYLL_ENV: production + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v3 # Deployment job deploy: @@ -60,28 +65,29 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - name: Checkout main branch + - name: Checkout Repository uses: actions/checkout@v4 with: - ref: "main" - - name: Copy _site contents + ref: "_site" + + - name: Configure Git run: | - cp -r _site/ Gemfile _config.yml /tmp/ - git checkout -b _site + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + + - name: Download Artifact + uses: actions/download-artifact@v3 + with: + name: _site + + - name: Deploy to Specific Branch + run: | + # Clear out existing contents rm -rf * - cp -r /tmp/_site/* /tmp/Gemfile /tmp/_config.yml ./ + # Copy _site contents to root + cp -r _site/* . + # Add all files git add --all - git config user.name github-actions - git config user.email github-actions@github.com - git commit -m "update _site content" - git push --force origin _site - - name: Deploy to GitHub Pages - uses: jeffreytse/jekyll-deploy-action@v0.5.1 - with: - provider: "github" - token: ${{ secrets.GITHUB_TOKEN }} - repository: "" - branch: "_site" - jekyll_src: "./" - jekyll_cfg: "_config.yml" - jekyll_baseurl: "/2nd-Minima" + # Commit and push + git commit -m "Deploy Jekyll site to '_site' branch" + git push origin HEAD:_site diff --git a/Gemfile.lock b/Gemfile.lock index 1c7a84e..f4d6f45 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,14 +12,19 @@ GEM addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) colorator (1.1.0) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) eventmachine (1.2.7) ffi (1.16.3) forwardable-extended (2.6.0) - google-protobuf (3.25.1-arm64-darwin) + google-protobuf (3.25.2) + google-protobuf (3.25.2-aarch64-linux) + google-protobuf (3.25.2-arm64-darwin) + google-protobuf (3.25.2-x86-linux) + google-protobuf (3.25.2-x86_64-darwin) + google-protobuf (3.25.2-x86_64-linux) http_parser.rb (0.8.0) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -59,8 +64,18 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) + nokogiri (1.16.0-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.0-arm-linux) + racc (~> 1.4) nokogiri (1.16.0-arm64-darwin) racc (~> 1.4) + nokogiri (1.16.0-x86-linux) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-linux) + racc (~> 1.4) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (5.0.4) @@ -71,7 +86,25 @@ GEM rexml (3.2.6) rouge (4.2.0) safe_yaml (1.0.5) - sass-embedded (1.69.7-arm64-darwin) + sass-embedded (1.70.0-aarch64-linux-gnu) + google-protobuf (~> 3.25) + sass-embedded (1.70.0-aarch64-linux-musl) + google-protobuf (~> 3.25) + sass-embedded (1.70.0-arm-linux-gnueabihf) + google-protobuf (~> 3.25) + sass-embedded (1.70.0-arm-linux-musleabihf) + google-protobuf (~> 3.25) + sass-embedded (1.70.0-arm64-darwin) + google-protobuf (~> 3.25) + sass-embedded (1.70.0-x86-linux-gnu) + google-protobuf (~> 3.25) + sass-embedded (1.70.0-x86-linux-musl) + google-protobuf (~> 3.25) + sass-embedded (1.70.0-x86_64-darwin) + google-protobuf (~> 3.25) + sass-embedded (1.70.0-x86_64-linux-gnu) + google-protobuf (~> 3.25) + sass-embedded (1.70.0-x86_64-linux-musl) google-protobuf (~> 3.25) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) @@ -79,8 +112,20 @@ GEM webrick (1.8.1) PLATFORMS - arm64-darwin-22 - ruby + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux + arm-linux-gnueabihf + arm-linux-musleabihf + arm64-darwin + x86-linux + x86-linux-gnu + x86-linux-musl + x86_64-darwin + x86_64-linux + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES bundler @@ -88,4 +133,4 @@ DEPENDENCIES minima! BUNDLED WITH - 2.5.4 + 2.5.5 diff --git a/README.md b/README.md index 4a809a0..79b4cd5 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The **2nd-Minima** Github repository is designed for individuals seeking to handily create a blog. It's a user-friendly, advanced **template** based on the popular [Jekyll-theme-Minima](https://github.com/jekyll/minima), perfect for those unfamiliar with front-end programming. -Experience a live example of a [2nd-Minima](https://github.com/Deep0Thinking/2nd-Minima) based website here: [Deep0Thinking.github.io](https://deep0thinking.github.io) +Experience a live demo of a [2nd-Minima](https://github.com/Deep0Thinking/2nd-Minima) based website here: [Deep0Thinking.github.io](https://deep0thinking.github.io) ![Deep0Thinking.github.io](https://repository-images.githubusercontent.com/481486169/e28e51cb-d7c1-49c7-b8e5-c81a3e27fb46) diff --git a/_posts/2022-11-28-How-to-post-posts.md b/_posts/2022-11-28-How-to-post-posts.md index fb59954..49c5bac 100644 --- a/_posts/2022-11-28-How-to-post-posts.md +++ b/_posts/2022-11-28-How-to-post-posts.md @@ -2,18 +2,20 @@ layout: post title: How to post posts tags: this-is-a-tag WoW let's go +toc: true description: You could write a brief description here to catch your readers' interests, like this is a post about how to post posts :) +thumbnail: https://deep0thinking.com/wp-content/uploads/2024/01/my-first-post.jpg --- -First, let's talk about the basic requirements for a valid post file: +Welcome to the 2nd-Minima Jekyll theme! This guide will walk you through creating and managing your posts effectively. Whether you're a beginner or an experienced Jekyll user, these instructions will help you make the most out of this theme. - **External requirements**: - - **Naming**: You need to name your post file with the naming format of "Year-Month-Date-Title.md", for example: "2022-11-28-My-first-post.md". ***(Attention: The file naming does not allow any "space" character, so please make sure to use "-" to replace them.)*** + - **Naming**: Posts should be named following the "Year-Month-Date-Title.md" format, for example: "2022-11-28-My-first-post.md". ***(Attention: Spaces (` `) are not permitted in file names. Use hyphens (`-`) to separate words)*** - - **Location**: You need to place your post file under the "**/_posts/**" folder. + - **Location**: Place your post files in the "**/_posts/**" directory - - **tag-page**: (You could temporarily skip this part until you have gotten up to the **tags** part under **Internal requirements** below) Please remember, if you add tags to a post, let's assume one of the tags name is "the-tag-you-add", then you should create a "**the-tag-you-add.md**" file under the "**/tag/**" folder in order to generate a tag-page for the "the-tag-you-add" and with just these contents in that "**the-tag-you-add.md**": + - **tag-page**: (This section can be deferred until you've read about **tags** in the **Internal Requirements**.) Please remember, if you add tags to a post, let's assume one of the tags name is "the-tag-you-add", then you should create a "**the-tag-you-add.md**" file under the "**/tag/**" folder in order to generate a tag-page for the "the-tag-you-add" tag and the "**the-tag-you-add.md**" file should contain the following: ```markdown --- @@ -23,7 +25,9 @@ First, let's talk about the basic requirements for a valid post file: --- ``` - And that tag-page would collect and display all your posts with that tag. In fact, there is a more efficient way to repeat this repetitive procedure, which is to create a python script to help you do that, for more detailed information please click on the solutions link below. + ***(Attention: Ensure the title is enclosed in double quotes (`"`) if it contains a colon (`:`) for successful tag page creation.)*** + + The tag page will aggregate and display all posts with the specified tag. Considering a more efficient implementation, which is to create a python script to automate this process, more details can be found in the solutions link right below. *The tags and tag-page display solutions are [here](http://longqian.me/2017/02/09/github-jekyll-tag/) provided by [Long Qian](http://longqian.me/aboutme/), great thanks to him!* @@ -31,32 +35,48 @@ First, let's talk about the basic requirements for a valid post file: - **Predeclaration**: - Every "**post.md**" file you posted need to have a **Predeclaration** in the form of this at the file's head (beginning) part (including this file: You can see the **Predeclaration** part at the beginning): + Each "**post.md**" file you posted must have a **Predeclaration** block in the form of this at the file's head (beginning) part (including this file: You can see the **Predeclaration** part at the beginning): ```markdown --- layout: post title: How to post posts tags: this-is-a-tag WoW let's go + toc: true description: You could write a brief description here to catch your readers' interests, like this is a post about how to post posts :) + thumbnail: https://deep0thinking.com/wp-content/uploads/2024/01/my-first-post.jpg --- ``` And let me explain this part line by line: - - **layout**: post + - **layout**: Apply the "???" layout from "_layouts/???.html" to the post. - Please just write 1 word "post". This means your post that you want to post would use the **post** layout of "**_layouts/page.html**" file. + Please just write 1 word "post" here for every post file. This means to apply the **post** layout from "**_layouts/post.html**" on your post. - - **title**: Please write your post title here. + - **title**: The title of your post. In fact, the file name in the **Naming** part of the **External requirements** can be different from the title name here, but it is always a good habit to keep them the same to disambiguate and improve convenience (just like writing the annotation when coding), especially when you want to read or modify these posts files in the future. But if you find a more efficient and effective naming method, you could definitely follow your way. - - **tags**: Please write your post tag(s) here. + - **tags**: List the tags associated with your post, separated by spaces (` `). Use hyphens (`-`) to avoid breaking multi-word tags. + + If you want to put 2 or more tags here, you need to use "space" (` `) to separate them, and what can you do if you don't want the tag to be separated, you could use `-` to replace the "space" to combine the words and prevent the breakage in 1 tag. For example: `this-is-a-tag` is 1 tag, `WoW` is 1 tag, but `let's go` is 2 tags, since it actually breaks into the 2 tags `let's` and `go` due to the "space" between them. + + - **toc**: Set to `true` to include a Table of Contents, `false` otherwise. + + The table of contents is a block contains a list of links to the different sections in your post. It is generated automatically based on the headings in your post. If you want to turn it off, just replace the `true` in `toc: true` with `false` or just simply delete that whole line. - If you want to put 2 or more tags here, you need to use "space" to separate them, and what can you do if you don't want the tag to be separated, you could use "-" to replace the "space" to combine the words and prevent the breakage in 1 tag. For example: `this-is-a-tag` is 1 tag, `WoW` is 1 tag, `let's go` is 2 tags, they actually break into 2 tags of `let's` and `go` due to the "space" between them. + When `true`, the toc appears on the left side of your post. It automatically generates clickable links to different sections based on Markdown headings (e.g., `# Heading`, `## Subheading`). Clicking on these links allows readers to quickly navigate to specific sections of your post. ***(Attention: While HTML headings like `

Heading

` will be included in the toc, they are not interactive and cannot be clicked to navigate to the respective sections. This feature is exclusively available for Markdown headings.)*** - - **description**: You could write a brief description in the description part to catch your readers' interests ***(Attention: Please don't leave "space" between ":" and following the word or punctuation in the description part, or your post and description will not be able to display.)*** , like this is a post about how to post posts (Me: It sounds super attractive right? Me again: Hahahahaha, no.) . Or, if you don't like the description part, you could always turn it off in the "**/_config.yml**" file by replacing the `true` in `show_description: true` with `false` or just simply delete that whole line. + Conversely, setting `toc` to `false` or removing the line entirely disables the toc. This means no interactive list of sections will appear on the left of your post, and there will be no clickable links for navigation within the post. + + - **thumbnail**: Put your post thumbnail link (URL or local path) here. + + The thumbnail link is the link of the image you want to display on the post page, it can be an URL like this: `https://deep0thinking.com/wp-content/uploads/2024/01/my-first-post.jpg` or a local file path like this: `/assets/img/my-first-post.jpg`. ***(Attention: Please make sure to use the correct link format, or the thumbnail would not be able to display.)*** + + - **description**: A short description to engage readers. Avoid spaces after colons in `???` inside `description: ???` like `description: Hi, : )`; `description: Hi, :)` is permitted. + + You could write a brief description in the description part to catch your readers' interests ***(Attention: Please don't leave "space" (` `) after `:` and following the word or punctuation in the description part, or your post and description will not be able to display.)*** , like this is a post about how to post posts (Me: It sounds super attractive right? Me again: Hahahahaha, no.) . If you don't want the description part in all posts (the post layout), you could disable it permanently in the "**/_config.yml**" file by replacing the `true` in `show_description: true` with `false` or just simply delete that whole line. - **Post body part**: @@ -70,12 +90,16 @@ First, let's talk about the basic requirements for a valid post file: - **Javascript** - Don't worry, you don't need to master these 4 languages to write a post, in fact, using only the Markdown language is basically enough (look at this post file name, its suffix is ".md" and md represents the Markdown language), because Markdown language can support the basic post arrangements and it is super easy and convenient to learn and use. BTW I bet you could master its basic syntax within 5 minutes, then you could be able to write the following Mardown contents too: + Don't worry, mastery of these languages is not required to write a post... In fact, using only the **Markdown** language is sufficient for most posts (look at this post file name, its suffix is ".md" and md represents the Markdown language), because Markdown language can support the basic post arrangements and it is super easy and convenient to learn and use. BTW I bet you could master its basic syntax within 5 minutes, then you could be able to write the following Markdown contents too:
-

+
+ +# Markdown Syntax + +
```markdown # Heading 1 @@ -157,17 +181,17 @@ print(a) Here is a table: |title 1|title 2|title 3| -|:-|:-:|-:| -|left|middle|right| -|text|text|text| +|:- | :-: | -:| +|left |middle |right | +|text |text |text | ``` Here is a table: |title 1|title 2|title 3| -|:-|:-:|-:| -|left|middle|right| -|text|text|text| +|:- | :-: | -:| +|left |middle |right | +|text |text |text |

@@ -239,21 +263,25 @@ BTW: They are totally free and it would be better if you use both of them to lea

+# HTML Syntax + +

+ ```html -

Heading

-

Heading

-

Heading

-

Heading

-
Heading
-
Heading
+

Heading 1

+

Heading 2

+

Heading 3

+

Heading 4

+
Heading 5
+
Heading 6
``` -

Heading

-

Heading

-

Heading

-

Heading

-
Heading
-
Heading
+

Heading 1

+

Heading 2

+

Heading 3

+

Heading 4

+
Heading 5
+
Heading 6


@@ -453,4 +481,4 @@ BTW: They are totally free and it would be better if you use both of them to lea

-Maybe you have already noticed the **fake comments section** below, wanna put it somewhere else or delete it? Click it for more information ~ +Maybe you have already noticed the **fake comments section** below, wanna activate it? Click it for more information ~ diff --git a/_posts/2024-01-20-My-first-post.md b/_posts/2024-01-20-My-first-post.md new file mode 100644 index 0000000..a3b7a87 --- /dev/null +++ b/_posts/2024-01-20-My-first-post.md @@ -0,0 +1,10 @@ +--- +layout: post +title: My first post +tags: WoW go +toc: true +description: Haha! This is my first post. +thumbnail: https://deep0thinking.com/wp-content/uploads/2024/01/my-first-post.jpg +--- + +### \ No newline at end of file diff --git a/_site/2022/11/28/How-to-post-posts.html b/_site/2022/11/28/How-to-post-posts.html index 6ff8fd2..c0784e4 100644 --- a/_site/2022/11/28/How-to-post-posts.html +++ b/_site/2022/11/28/How-to-post-posts.html @@ -1,5 +1,5 @@ - + @@ -27,19 +27,7 @@ - - -