Compare commits

..

7 Commits

10 changed files with 140 additions and 75 deletions

View File

@ -9,8 +9,11 @@ trim_trailing_whitespace = true
end_of_line = lf end_of_line = lf
insert_final_newline = true insert_final_newline = true
[*.js] [*.{js,css,scss}]
indent_size = 4 quote_type = single
[*.{yml,yaml}]
quote_type = double
[*.md] [*.md]
trim_trailing_whitespace = false trim_trailing_whitespace = false

View File

@ -28,7 +28,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
# submodules: true # submodules: true
@ -37,12 +37,12 @@ jobs:
- name: Setup Pages - name: Setup Pages
id: pages id: pages
uses: actions/configure-pages@v1 uses: actions/configure-pages@v3
- name: Setup Ruby - name: Setup Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: 3 # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted ruby-version: 3
bundler-cache: true bundler-cache: true
- name: Build site - name: Build site
@ -52,7 +52,9 @@ jobs:
- name: Test site - name: Test site
run: | run: |
bundle exec htmlproofer _site --disable-external --check-html --allow_hash_href bundle exec htmlproofer _site \
\-\-disable-external=true \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
- name: Upload site artifact - name: Upload site artifact
uses: actions/upload-pages-artifact@v1 uses: actions/upload-pages-artifact@v1
@ -68,4 +70,4 @@ jobs:
steps: steps:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v1 uses: actions/deploy-pages@v2

29
.gitignore vendored
View File

@ -1,21 +1,22 @@
# hidden files # Bundler cache
.* .bundle
!.git*
!.editorconfig
!.nojekyll
!.husky
!.commitlintrc.json
!.versionrc.json
!.stylelintrc.json
# bundler cache
_site
vendor vendor
Gemfile.lock Gemfile.lock
# rubygem # Jekyll cache
.jekyll-cache
_site
# RubyGems
*.gem *.gem
# npm dependencies # NPM dependencies
node_modules node_modules
package-lock.json package-lock.json
# IDE configurations
.idea
.vscode
# Misc
assets/js/dist

View File

@ -2,10 +2,10 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "jekyll-theme-chirpy", "~> 5.5", ">= 5.5.1" gem "jekyll-theme-chirpy", "~> 6.2"
group :test do group :test do
gem "html-proofer", "~> 3.18" gem "html-proofer", "~> 4.4"
end end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem

View File

@ -1,10 +1,18 @@
# Chirpy Starter [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy)](https://rubygems.org/gems/jekyll-theme-chirpy) [![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter.svg?color=blue)][mit] # Chirpy Starter
When installing the [**Chirpy**][chirpy] theme through [RubyGems.org][gem], Jekyll can only read files in the folders `/_data`, `/_layouts`, `/_includes`, `/_sass` and `/assets`, as well as a small part of options of the `/_config.yml` file from the theme's gem. If you have ever installed this theme gem, you can use the command `bundle info --path jekyll-theme-chirpy` to locate these files. [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy)][gem] 
[![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter.svg?color=blue)][mit]
The Jekyll team claims that this is to leave the ball in the users court, but this also results in users not being able to enjoy the out-of-the-box experience when using feature-rich themes. When installing the [**Chirpy**][chirpy] theme through [RubyGems.org][gem], Jekyll can only read files in the folders
`_data`, `_layouts`, `_includes`, `_sass` and `assets`, as well as a small part of options of the `_config.yml` file
from the theme's gem. If you have ever installed this theme gem, you can use the command
`bundle info --path jekyll-theme-chirpy` to locate these files.
To fully use all the features of **Chirpy**, you need to copy the other critical files from the theme's gem to your Jekyll site. The following is a list of targets: The Jekyll team claims that this is to leave the ball in the users court, but this also results in users not being
able to enjoy the out-of-the-box experience when using feature-rich themes.
To fully use all the features of **Chirpy**, you need to copy the other critical files from the theme's gem to your
Jekyll site. The following is a list of targets:
```shell ```shell
. .
@ -14,19 +22,22 @@ To fully use all the features of **Chirpy**, you need to copy the other critical
└── index.html └── index.html
``` ```
In order to save your time, and to prevent you from missing some files when copying, we extract those files/configurations of the latest version of the **Chirpy** theme and the [CD][CD] workflow to here, so that you can start writing in minutes. To save you time, and also in case you lose some files while copying, we extract those files/configurations of the
latest version of the **Chirpy** theme and the [CD][CD] workflow to here, so that you can start writing in minutes.
## Prerequisites ## Prerequisites
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`. Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of
the basic environment. [Git](https://git-scm.com/) also needs to be installed.
## Installation ## Installation
[**Use this template**][use-template] to generate a brand new repository and name it `<GH_USERNAME>.github.io`, where `GH_USERNAME` represents your GitHub username. Sign in to GitHub and [**use this template**][use-template] to generate a brand new repository and name it
`USERNAME.github.io`, where `USERNAME` represents your GitHub username.
Then clone it to your local machine and run: Then clone it to your local machine and run:
``` ```console
$ bundle $ bundle
``` ```

View File

@ -5,15 +5,14 @@ theme: jekyll-theme-chirpy
# Change the following value to '/PROJECT_NAME' ONLY IF your site type is GitHub Pages Project sites # Change the following value to '/PROJECT_NAME' ONLY IF your site type is GitHub Pages Project sites
# and doesn't have a custom domain. # and doesn't have a custom domain.
baseurl: '' baseurl: ""
# The language of the webpage http://www.lingoes.net/en/translator/langcode.htm # The language of the webpage http://www.lingoes.net/en/translator/langcode.htm
# If it has the same name as one of the files in folder `_data/locales`, the layout language will also be changed, # If it has the same name as one of the files in folder `_data/locales`, the layout language will also be changed,
# otherwise, the layout language will use the default value of 'en'. # otherwise, the layout language will use the default value of 'en'.
lang: en lang: en
# Change to your timezone https://kevinnovak.github.io/Time-Zone-Picker
# Change to your timezone http://www.timezoneconverter.com/cgi-bin/findzone/findzone
timezone: timezone:
# jekyll-seo-tag settings https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md # jekyll-seo-tag settings https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
@ -24,10 +23,10 @@ title: Chirpy # the main title
tagline: A text-focused Jekyll theme # it will display as the sub-title tagline: A text-focused Jekyll theme # it will display as the sub-title
description: >- # used by seo meta and the atom feed description: >- # used by seo meta and the atom feed
A minimal, responsive, and powerful Jekyll theme for presenting professional writing. A minimal, responsive and feature-rich Jekyll theme for technical writing.
# fill in the protocol & hostname for your site, e.g., 'https://username.github.io' # fill in the protocol & hostname for your site, e.g., 'https://username.github.io'
url: '' url: ""
github: github:
username: github_username # change to your github username username: github_username # change to your github username
@ -55,10 +54,6 @@ google_site_verification: # fill in to your verification string
google_analytics: google_analytics:
id: # fill in your Google Analytics ID id: # fill in your Google Analytics ID
# Google Analytics pageviews report settings
pv:
proxy_endpoint: # fill in the Google Analytics superProxy endpoint of Google App Engine
cache_path: # the local PV cache data, friendly to visitors from GFW region
# Prefer color scheme setting. # Prefer color scheme setting.
# #
@ -83,7 +78,7 @@ img_cdn:
# the avatar on sidebar, support local or CORS resources # the avatar on sidebar, support local or CORS resources
avatar: avatar:
# boolean type, the global switch for ToC in posts. # boolean type, the global switch for TOC in posts.
toc: true toc: true
comments: comments:
@ -139,7 +134,7 @@ collections:
defaults: defaults:
- scope: - scope:
path: '' # An empty string here means all files in the project path: "" # An empty string here means all files in the project
type: posts type: posts
values: values:
layout: post layout: post
@ -153,7 +148,7 @@ defaults:
values: values:
comments: false comments: false
- scope: - scope:
path: '' path: ""
type: tabs # see `site.collections` type: tabs # see `site.collections`
values: values:
layout: page layout: page
@ -180,14 +175,14 @@ compress_html:
envs: [development] envs: [development]
exclude: exclude:
- '*.gem' - "*.gem"
- '*.gemspec' - "*.gemspec"
- docs
- tools - tools
- README.md - README.md
- CHANGELOG.md - CHANGELOG.md
- LICENSE - LICENSE
- gulpfile.js - rollup.config.js
- node_modules
- package*.json - package*.json
jekyll-archives: jekyll-archives:

28
_data/contact.yml Normal file
View File

@ -0,0 +1,28 @@
# The contact options.
- type: github
icon: "fab fa-github"
- type: twitter
icon: "fa-brands fa-x-twitter"
- type: email
icon: "fas fa-envelope"
noblank: true # open link in current tab
- type: rss
icon: "fas fa-rss"
noblank: true
# Uncomment and complete the url below to enable more contact options
#
# - type: mastodon
# icon: 'fab fa-mastodon' # icons powered by <https://fontawesome.com/>
# url: '' # Fill with your Mastodon account page, rel="me" will be applied for verification
#
# - type: linkedin
# icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/>
# url: '' # Fill with your Linkedin homepage
#
# - type: stack-overflow
# icon: 'fab fa-stack-overflow'
# url: '' # Fill with your stackoverflow homepage

25
_data/share.yml Normal file
View File

@ -0,0 +1,25 @@
# Sharing options at the bottom of the post.
# Icons from <https://fontawesome.com/>
platforms:
- type: Twitter
icon: "fa-brands fa-square-x-twitter"
link: "https://twitter.com/intent/tweet?text=TITLE&url=URL"
- type: Facebook
icon: "fab fa-facebook-square"
link: "https://www.facebook.com/sharer/sharer.php?title=TITLE&u=URL"
- type: Telegram
icon: "fab fa-telegram"
link: "https://t.me/share/url?url=URL&text=TITLE"
# Uncomment below if you need to.
#
# - type: Linkedin
# icon: "fab fa-linkedin"
# link: "https://www.linkedin.com/sharing/share-offsite/?url=URL"
#
# - type: Weibo
# icon: "fab fa-weibo"
# link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"

View File

@ -1,5 +1,5 @@
--- ---
layout: tags layout: tags
icon: fas fa-tag icon: fas fa-tags
order: 2 order: 2
--- ---