Improve code style
- js/css - markdown - shell
This commit is contained in:
parent
d8a42d9bb4
commit
8e84c6b9d6
14 changed files with 961 additions and 917 deletions
19
README.md
19
README.md
|
@ -81,9 +81,6 @@ $ bundle info --path jekyll-theme-chirpy
|
|||
|
||||
Or you can [use the starter template][use-starter] to create a Jekyll site to save time copying contents from theme's gem.
|
||||
|
||||
[starter]: https://github.com/cotes2020/chirpy-starter
|
||||
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
||||
|
||||
### Fork From GitHub
|
||||
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) from GitHub and clone your fork to local.
|
||||
|
@ -114,7 +111,6 @@ What it does is:
|
|||
|
||||
3. Automatically create a commit to save the changes.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Configuration
|
||||
|
@ -158,11 +154,8 @@ For security reasons, GitHub Pages build runs on `safe` mode, which restricts us
|
|||
Quickly check the files needed for GitHub Actions build:
|
||||
|
||||
1. Ensure your Jekyll site has the file `/.github/workflows/pages-deploy.yml`. Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
|
||||
|
||||
2. Ensuer your Jekyll site has file `/tools/test.sh` and `/tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
|
||||
|
||||
[workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||
|
||||
Next, rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
|
||||
|
||||
And then publish your Jekyll site by:
|
||||
|
@ -197,7 +190,6 @@ $ docker run -it --rm \
|
|||
|
||||
Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to your web server.
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
For more details and the better reading experience, please check out the [tutorials on demo site](https://chirpy.cotes.info/categories/tutorial/). In the meanwhile, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
||||
|
@ -212,11 +204,9 @@ This theme is mainly built with [Jekyll](https://jekyllrb.com/) ecosystem, [Boot
|
|||
|
||||
:tada: Thanks to all the volunteers who contributed to this project, their GitHub IDs are on [this list](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors). Also, I won't forget those guys who submitted the issues or unmerged PR because they reported bugs, shared ideas or inspired me to write more readable documentation.
|
||||
|
||||
Also, thank [JetBrains][JB] for providing the open source license.
|
||||
Also, thank [JetBrains][jb] for providing the open source license.
|
||||
|
||||
[![JB-logo](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/jetbrains.svg)][JB]
|
||||
|
||||
[JB]:https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||
[![JB-logo](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/jetbrains.svg)][jb]
|
||||
|
||||
## Supporting
|
||||
|
||||
|
@ -225,3 +215,8 @@ If you enjoy this theme or find it helpful, please consider becoming my sponsor,
|
|||
## License
|
||||
|
||||
This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) License.
|
||||
|
||||
[starter]: https://github.com/cotes2020/chirpy-starter
|
||||
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
||||
[workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||
[jb]:https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||
|
|
|
@ -48,9 +48,6 @@ $ bundle info --path jekyll-theme-chirpy
|
|||
|
||||
Or you can [use the starter template][use-starter] to create a Jekyll site to save time copying contents from theme's gem.
|
||||
|
||||
[starter]: https://github.com/cotes2020/chirpy-starter
|
||||
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
||||
|
||||
### Fork From GitHub
|
||||
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) from GitHub and clone your fork to local.
|
||||
|
@ -125,11 +122,8 @@ For security reasons, GitHub Pages build runs on `safe` mode, which restricts us
|
|||
Quickly check the files needed for GitHub Actions build:
|
||||
|
||||
1. Ensure your Jekyll site has the file `/.github/workflows/pages-deploy.yml`. Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
|
||||
|
||||
2. Ensuer your Jekyll site has file `/tools/test.sh` and `/tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
|
||||
|
||||
[workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||
|
||||
Next, rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
|
||||
|
||||
And then publish your Jekyll site by:
|
||||
|
|
|
@ -16,10 +16,10 @@ This post is to enable Page Views on the [**Chirpy**][chirpy-homepage] theme bas
|
|||
First, you need to setup your account on Google analytics. While your create your account, you must create your first **Property** as well.
|
||||
|
||||
1. Head to <https://analytics.google.com/> and click on **Start Measuring**
|
||||
2. Enter your desired *Account Name* and choose the desired checkboxes
|
||||
3. Enter your desired *Property Name*. This is the name of the tracker project that appears on your Google Analytics dashboard
|
||||
4. Enter the required information *About your business*
|
||||
5. Hit *Create* and accept any license popup to setup your Google Analytics account and create your property
|
||||
2. Enter your desired _Account Name_ and choose the desired checkboxes
|
||||
3. Enter your desired _Property Name_. This is the name of the tracker project that appears on your Google Analytics dashboard
|
||||
4. Enter the required information _About your business_
|
||||
5. Hit _Create_ and accept any license popup to setup your Google Analytics account and create your property
|
||||
|
||||
### Create Data Stream
|
||||
|
||||
|
@ -75,9 +75,9 @@ There is a detailed [tutorial](https://developers.google.com/analytics/solutions
|
|||
|
||||
8. Click on **Enable APIs and Services** button on the top
|
||||
|
||||
9. Enable the following APIs: *Google Analytics API*
|
||||
9. Enable the following APIs: _Google Analytics API_
|
||||
|
||||
10. On the left, Click on *OAuth Consent Screen* and accept **Configure Consent Screen**. Select **External** since your blog is probably hosted for the public. Click on **Publish** under *Publishing Status*
|
||||
10. On the left, Click on _OAuth Consent Screen_ and accept **Configure Consent Screen**. Select **External** since your blog is probably hosted for the public. Click on **Publish** under _Publishing Status_
|
||||
|
||||
11. Click on **Credentials** on the left and create a new **OAuth Client IDs** credential. Make sure to add a entry under `Authorized redirect URIs` that matches: `https://<project-id>.<region>.r.appspot.com/admin/auth`
|
||||
|
||||
|
@ -116,7 +116,8 @@ There is a detailed [tutorial](https://developers.google.com/analytics/solutions
|
|||
1. Clone the **Google Analytics superProxy** project on Github: <https://github.com/googleanalytics/google-analytics-super-proxy> to your local.
|
||||
|
||||
2. Remove the first 2 lines in the [`src/app.yaml`](https://github.com/googleanalytics/google-analytics-super-proxy/blob/master/src/app.yaml#L1-L2) file:
|
||||
```diff
|
||||
|
||||
```yaml
|
||||
-application: your-project-id
|
||||
-version: 1
|
||||
```
|
||||
|
@ -143,6 +144,7 @@ There is a detailed [tutorial](https://developers.google.com/analytics/solutions
|
|||
# XSRF Settings
|
||||
XSRF_KEY = 'OnceUponATimeThereLivedALegend'
|
||||
```
|
||||
|
||||
**Tip:** You can configure a custom domain instead of `https://PROJECT_ID.REGION_ID.r.appspot.com`. But, for the sake of keeping it simple, we will be using the Google provided default URL.
|
||||
|
||||
5. From inside the src/ directory, deploy the app
|
||||
|
@ -194,16 +196,13 @@ Head to `https://PROJECT_ID.REGION_ID.r.appspot.com/admin` and create a query af
|
|||
The query parameters are as follows:
|
||||
|
||||
- **start-date**: fill in the first day of blog posting
|
||||
|
||||
- **end-date**: fill in `today` (this is a parameter supported by GA Report, which means that it will always end according to the current query date)
|
||||
|
||||
- **metrics**: select `ga:pageviews`
|
||||
|
||||
- **dimensions**: select `ga:pagePath`
|
||||
|
||||
In order to reduce the returned results and reduce the network bandwidth, we add custom filtering rules [^ga-filters]:
|
||||
|
||||
- **filters**: fill in `ga:pagePath=~^/posts/.*/$;ga:pagePath!@=`
|
||||
- **filters**: fill in `ga:pagePath=~^/posts/.*/$;ga:pagePath!@=`.
|
||||
|
||||
Among them, `;` means using _logical AND_ to concatenate two rules.
|
||||
|
||||
|
@ -224,6 +223,7 @@ Once all the hard part is done, it is very easy to enable the Page View on Chirp
|
|||
|
||||
Update the `_config.yml` file of [**Chirpy**][chirpy-homepage] project with the values from your dashboard, to look similar to the following:
|
||||
|
||||
|
||||
```yaml
|
||||
google_analytics:
|
||||
id: 'G-XXXXXXXXXX' # Fill with your Google Analytics ID
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -100,6 +100,7 @@
|
|||
|
||||
@mixin panel-label {
|
||||
@include label(inherit);
|
||||
|
||||
display: block;
|
||||
line-height: 1.2;
|
||||
padding-top: 0.5rem;
|
||||
|
|
|
@ -6,17 +6,18 @@
|
|||
* MIT Licensed
|
||||
*/
|
||||
|
||||
@import "colors/light-typography";
|
||||
@import "colors/dark-typography";
|
||||
@import
|
||||
"colors/light-typography",
|
||||
"colors/dark-typography",
|
||||
|
||||
@import "addon/module";
|
||||
@import "addon/variables";
|
||||
@import 'addon/syntax';
|
||||
@import "addon/commons";
|
||||
"addon/module",
|
||||
"addon/variables",
|
||||
"addon/syntax",
|
||||
"addon/commons",
|
||||
|
||||
@import "layout/home";
|
||||
@import "layout/post";
|
||||
@import "layout/tags";
|
||||
@import "layout/archives";
|
||||
@import "layout/categories";
|
||||
@import "layout/category-tag";
|
||||
"layout/home",
|
||||
"layout/post",
|
||||
"layout/tags",
|
||||
"layout/archives",
|
||||
"layout/categories",
|
||||
"layout/category-tag";
|
||||
|
|
|
@ -14,34 +14,12 @@
|
|||
|
||||
#archives {
|
||||
letter-spacing: 0.03rem;
|
||||
li {
|
||||
font-size: 1.1rem;
|
||||
line-height: 3rem;
|
||||
&:nth-child(odd) {
|
||||
background-color: var(--main-wrapper-bg, #fff);
|
||||
background-image: linear-gradient(
|
||||
to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
|
||||
}
|
||||
> div {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
span.lead {
|
||||
font-size: 1.5rem;
|
||||
position: relative;
|
||||
left: 8px;
|
||||
|
||||
&:not(:first-child) {
|
||||
position: relative;
|
||||
left: 4px;
|
||||
&::after {
|
||||
left: 67px;
|
||||
}
|
||||
}
|
||||
|
||||
&::after { /* Year dot */
|
||||
content: "";
|
||||
display: block;
|
||||
|
@ -59,8 +37,64 @@
|
|||
box-shadow: 0 0 2px 0 #c2c6cc;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&:not(:first-child) {
|
||||
position: relative;
|
||||
left: 4px;
|
||||
&::after {
|
||||
left: 67px;
|
||||
}
|
||||
}
|
||||
|
||||
} // #archives span.lead
|
||||
|
||||
ul {
|
||||
li {
|
||||
font-size: 1.1rem;
|
||||
line-height: 3rem;
|
||||
|
||||
div {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
a {
|
||||
/* post title in Archvies */
|
||||
margin-left: 2.5rem;
|
||||
position: relative;
|
||||
top: 0.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(odd) {
|
||||
background-color: var(--main-wrapper-bg, #fff);
|
||||
background-image: linear-gradient(to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
|
||||
}
|
||||
|
||||
&::after {
|
||||
@extend %date-timeline;
|
||||
|
||||
height: 2.8rem;
|
||||
top: -1.3rem;
|
||||
}
|
||||
|
||||
&:first-child::before {
|
||||
@extend %date-timeline;
|
||||
|
||||
height: 3.06rem;
|
||||
top: -1.61rem;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:last-child) > li:last-child::after {
|
||||
height: 3.4rem;
|
||||
}
|
||||
|
||||
&:last-child > li:last-child::after {
|
||||
display: none;
|
||||
}
|
||||
} // #archives ul
|
||||
|
||||
.date {
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
|
@ -97,36 +131,8 @@
|
|||
}
|
||||
} // #archives .date
|
||||
|
||||
ul {
|
||||
> li {
|
||||
> div > a {
|
||||
/* post title in Archvies */
|
||||
margin-left: 2.5rem;
|
||||
position: relative;
|
||||
top: 0.1rem;
|
||||
}
|
||||
&::after {
|
||||
@extend %date-timeline;
|
||||
height: 2.8rem;
|
||||
top: -1.3rem;
|
||||
}
|
||||
&:first-child::before {
|
||||
@extend %date-timeline;
|
||||
height: 3.06rem;
|
||||
top: -1.61rem;
|
||||
}
|
||||
}
|
||||
&:not(:last-child) > li:last-child::after {
|
||||
height: 3.4rem;
|
||||
}
|
||||
&:last-child > li:last-child::after {
|
||||
display: none;
|
||||
}
|
||||
} // #archives ul
|
||||
|
||||
} // #archives
|
||||
|
||||
|
||||
@media all and (max-width: 576px) {
|
||||
#archives {
|
||||
margin-top: -1rem;
|
||||
|
|
|
@ -11,6 +11,14 @@
|
|||
.card-header {
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
i {
|
||||
&.far,
|
||||
&.fas {
|
||||
font-size: 86%; // fontawesome icons
|
||||
}
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
|
@ -29,12 +37,6 @@
|
|||
@extend %category-icon-color;
|
||||
}
|
||||
|
||||
i {
|
||||
&.far, &.fas {
|
||||
font-size: 86%; // fontawesome icons
|
||||
}
|
||||
}
|
||||
|
||||
} // .categories
|
||||
|
||||
.category-trigger {
|
||||
|
|
|
@ -2,10 +2,17 @@
|
|||
Style for page Category and Tag
|
||||
*/
|
||||
|
||||
#page-category, #page-tag {
|
||||
.dash {
|
||||
margin: 0 .5rem .6rem .5rem;
|
||||
border-bottom: 2px dotted var(--dash-color);
|
||||
}
|
||||
|
||||
#page-category,
|
||||
#page-tag {
|
||||
ul > li {
|
||||
line-height: 1.5rem;
|
||||
padding: 0.6rem 0;
|
||||
|
||||
&::before { // dot
|
||||
background: #999;
|
||||
width: 5px;
|
||||
|
@ -17,14 +24,16 @@
|
|||
top: 0.6rem;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
> a { /* post's title */
|
||||
font-size: 1.1rem;
|
||||
@extend %no-bottom-border;
|
||||
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
> span:last-child {
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* post's date */
|
||||
} /* post's date */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,22 +45,19 @@
|
|||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
#page-category,
|
||||
#page-tag,
|
||||
#access-lastmod {
|
||||
a:hover {
|
||||
#page-category &,
|
||||
#page-tag &,
|
||||
#access-lastmod & {
|
||||
@extend %link-hover;
|
||||
|
||||
margin-bottom: -1px; // Avoid jumping
|
||||
}
|
||||
}
|
||||
|
||||
.dash {
|
||||
margin: 0 .5rem .6rem .5rem;
|
||||
border-bottom: 2px dotted var(--dash-color);
|
||||
}
|
||||
|
||||
@media all and (max-width: 576px) {
|
||||
#page-category, #page-tag {
|
||||
#page-category,
|
||||
#page-tag {
|
||||
ul > li {
|
||||
&::before {
|
||||
margin: 0 .5rem;
|
||||
|
|
|
@ -2,6 +2,60 @@
|
|||
Style for Homepage
|
||||
*/
|
||||
|
||||
.pagination {
|
||||
font-size: 1rem;
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.page-item {
|
||||
.page-link {
|
||||
color: var(--btn-patinator-text-color);
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
border: 1px solid var(--btn-paginator-border-color);
|
||||
font-family: 'Lato', sans-serif;
|
||||
background-color: var(--button-bg);
|
||||
&:hover {
|
||||
background-color: var(--btn-paginator-hover-color);
|
||||
}
|
||||
}
|
||||
&.active {
|
||||
.page-link {
|
||||
background-color: var(--btn-active-bg);
|
||||
border-color: var(--btn-active-border-color);
|
||||
box-shadow: 0 0 8px 0 var(--btn-paginator-shadow) !important;
|
||||
color: var(--btn-text-color);
|
||||
}
|
||||
}
|
||||
&.disabled {
|
||||
cursor: not-allowed;
|
||||
.page-link {
|
||||
color: rgba(108, 117, 125, 0.57);
|
||||
border-color: var(--btn-paginator-border-color);
|
||||
background-color: var(--button-bg);
|
||||
}
|
||||
}
|
||||
&:first-child .page-link,
|
||||
&:last-child .page-link {
|
||||
border-radius: 50%;
|
||||
}
|
||||
&:not(:last-child) {
|
||||
margin-right: 0.7rem;
|
||||
}
|
||||
} // .page-item
|
||||
|
||||
} // .pagination
|
||||
|
||||
#post-list {
|
||||
margin-top: 1rem;
|
||||
padding-right: 0.5rem;
|
||||
|
@ -11,6 +65,10 @@
|
|||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--main-border-color);
|
||||
|
||||
a:hover {
|
||||
@extend %link-hover;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.4rem;
|
||||
margin: 0;
|
||||
|
@ -55,60 +113,6 @@
|
|||
|
||||
} // #post-list
|
||||
|
||||
.pagination {
|
||||
font-size: 1rem;
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.page-item {
|
||||
.page-link {
|
||||
color: var(--btn-patinator-text-color);
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
border: 1px solid var(--btn-paginator-border-color);
|
||||
font-family: 'Lato', sans-serif;
|
||||
background-color: var(--button-bg);
|
||||
&:hover {
|
||||
background-color: var(--btn-paginator-hover-color)
|
||||
}
|
||||
}
|
||||
&.active {
|
||||
.page-link {
|
||||
background-color: var(--btn-active-bg);
|
||||
border-color: var(--btn-active-border-color);
|
||||
box-shadow: 0 0 8px 0 var(--btn-paginator-shadow) !important;
|
||||
color: var(--btn-text-color);
|
||||
}
|
||||
}
|
||||
&.disabled {
|
||||
cursor: not-allowed;
|
||||
.page-link {
|
||||
color: rgba(108, 117, 125, 0.57);
|
||||
border-color: var(--btn-paginator-border-color);
|
||||
background-color: var(--button-bg);
|
||||
}
|
||||
}
|
||||
&:first-child .page-link,
|
||||
&:last-child .page-link {
|
||||
border-radius: 50%;
|
||||
}
|
||||
&:not(:last-child) {
|
||||
margin-right: 0.7rem;
|
||||
}
|
||||
} // .page-item
|
||||
|
||||
} // .pagination
|
||||
|
||||
/* Hide SideBar and TOC */
|
||||
@media all and (max-width: 830px) {
|
||||
.pagination {
|
||||
|
|
|
@ -41,9 +41,10 @@
|
|||
|
||||
.post-content {
|
||||
.preview-img {
|
||||
@include align-center;
|
||||
|
||||
margin-top: 0;
|
||||
margin-bottom: 2.5rem;
|
||||
@include align-center;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,6 +64,7 @@
|
|||
|
||||
.btn {
|
||||
@include btn-post-nav;
|
||||
|
||||
color: var(--link-color);
|
||||
&:hover {
|
||||
background: #2a408e;
|
||||
|
@ -71,6 +73,7 @@
|
|||
}
|
||||
&.disabled {
|
||||
@include btn-post-nav;
|
||||
|
||||
pointer-events: auto;
|
||||
cursor: not-allowed;
|
||||
background: none;
|
||||
|
@ -145,7 +148,6 @@
|
|||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
|
||||
/* --- Related Posts --- */
|
||||
|
||||
#related-posts {
|
||||
|
@ -222,6 +224,11 @@
|
|||
.share-wrapper {
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
|
||||
i {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.share-icons {
|
||||
font-size: 1.2rem;
|
||||
a {
|
||||
|
@ -243,7 +250,7 @@
|
|||
}
|
||||
.fab {
|
||||
&.fa-twitter {
|
||||
@include btn-sharing-color(rgba(29, 161, 242, 1.00));
|
||||
@include btn-sharing-color(rgba(29, 161, 242, 1));
|
||||
}
|
||||
&.fa-facebook-square {
|
||||
@include btn-sharing-color(rgb(66, 95, 156));
|
||||
|
@ -264,9 +271,9 @@
|
|||
|
||||
} // .share-wrapper
|
||||
|
||||
|
||||
.share-label {
|
||||
@include label(inherit, 400, inherit);
|
||||
|
||||
&::after {
|
||||
content: ":";
|
||||
}
|
||||
|
@ -280,15 +287,12 @@
|
|||
@extend %link-hover;
|
||||
}
|
||||
}
|
||||
i {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
span:last-child {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
} // .license-wrapper
|
||||
|
||||
|
||||
@media all and (max-width: 576px) {
|
||||
.post-tail-bottom {
|
||||
-ms-flex-wrap: wrap-reverse !important;
|
||||
|
@ -301,8 +305,8 @@
|
|||
|
||||
.post-content > div[class^='language-'] {
|
||||
@include ml-mr(-1.25rem);
|
||||
border-radius: 0;
|
||||
|
||||
border-radius: 0;
|
||||
&::before { // the lang badge
|
||||
right: 1rem;
|
||||
}
|
||||
|
|
|
@ -86,9 +86,6 @@ $ bundle info --path jekyll-theme-chirpy
|
|||
|
||||
或者你可以 [使用 starter template][use-starter] 来快速创建 Jekyll 站点,以省去复制主题 gem 文件的时间。
|
||||
|
||||
[starter]: https://github.com/cotes2020/chirpy-starter
|
||||
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
||||
|
||||
### 在 GitHub 上 Fork
|
||||
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) 然后克隆到本地。
|
||||
|
@ -159,9 +156,10 @@ $ docker run -it --rm \
|
|||
|
||||
由于安全原因,GitHub Pages 的构建强制加了 `safe`参数,这导致了我们不能使用插件去创建所需的附加页面。因此,我们可以使用 GitHub Actions 去构建站点,把站点文件存储在一个新分支上,再指定该分支作为 Pages 服务的源。
|
||||
|
||||
确保你的 Jekyll 站点存在文件 `/.github/workflows/pages-deploy.yml`。没有的话,新建并填入[示例工作流][workflow]的内容, 注意参数 `on.push.branches` 的值必须和你的仓库默认分支名相同。
|
||||
快速检查 GitHub Actions 构建需要的文件:
|
||||
|
||||
[workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||
1. 确保你的 Jekyll 站点存在文件 `/.github/workflows/pages-deploy.yml`。没有的话,新建并填入[示例工作流][workflow]的内容, 注意参数 `on.push.branches` 的值必须和你的仓库默认分支名相同。
|
||||
2. 检查你的 Jekyll 站点是否有文件 `/tools/test.sh` 和 `/tools/deploy.sh`. 没有的话, 从本仓库拷贝到你的 Jekyll 项目.
|
||||
|
||||
在 GitHub 把你的仓库命名为 `<GH-USERNAME>.github.io`,然后:
|
||||
|
||||
|
@ -209,11 +207,9 @@ $ docker run -it --rm \
|
|||
|
||||
:tada: 感谢所有参与代码贡献的小伙伴, 他们的 GayHub ID 在这个[列表](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors)。 另外, 提交过 issues(或者未被合并 PR) 的高富帅和白富美也不会被遗忘,他/她们帮助报告 bug、分享新点子或者启发了我写出更通俗易懂的文档。
|
||||
|
||||
还有,感谢 [JetBrains][JB] 提供开源 License!
|
||||
还有,感谢 [JetBrains][jb] 提供开源 License!
|
||||
|
||||
[![JB-logo](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/jetbrains.svg)][JB]
|
||||
|
||||
[JB]:https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||
[![JB-logo](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/jetbrains.svg)][jb]
|
||||
|
||||
## 赞助
|
||||
|
||||
|
@ -222,3 +218,8 @@ $ docker run -it --rm \
|
|||
## 许可证书
|
||||
|
||||
本项目开源,基于 [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) 许可。
|
||||
|
||||
[starter]: https://github.com/cotes2020/chirpy-starter
|
||||
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
||||
[workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||
[jb]:https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||
|
|
|
@ -12,7 +12,6 @@ const fs = require('fs');
|
|||
|
||||
const JS_ROOT = './assets/js';
|
||||
const jsDest = `${ JS_ROOT }/dist/`;
|
||||
const copyrightPath = `${ JS_ROOT }/.copyright`;
|
||||
|
||||
function concatJs(files, output) {
|
||||
return src(files)
|
||||
|
@ -23,7 +22,7 @@ function concatJs(files, output) {
|
|||
|
||||
function minifyJs() {
|
||||
return src(`${ jsDest }/*.js`)
|
||||
.pipe(insert.prepend(fs.readFileSync(copyrightPath, 'utf8')))
|
||||
.pipe(insert.prepend(fs.readFileSync(`${ JS_ROOT }/.copyright`, 'utf8')))
|
||||
.pipe(uglify({output: {comments: /^!|@preserve|@license|@cc_on/i}}))
|
||||
.pipe(dest(jsDest));
|
||||
}
|
||||
|
|
|
@ -21,15 +21,15 @@ NODE_META="package.json"
|
|||
|
||||
bump_assets() {
|
||||
_version="$1"
|
||||
for i in ${!ASSETS[@]}; do
|
||||
sed -i "s/v[[:digit:]]\.[[:digit:]]\.[[:digit:]]/v$_version/" ${ASSETS[$i]}
|
||||
for i in "${!ASSETS[@]}"; do
|
||||
sed -i "s/v[[:digit:]]\.[[:digit:]]\.[[:digit:]]/v$_version/" "${ASSETS[$i]}"
|
||||
done
|
||||
|
||||
gulp
|
||||
}
|
||||
|
||||
bump_gemspec() {
|
||||
sed -i "s/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/$1/" $GEM_SPEC
|
||||
sed -i "s/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/$1/" "$GEM_SPEC"
|
||||
}
|
||||
|
||||
bump_node() {
|
||||
|
@ -39,9 +39,9 @@ bump_node() {
|
|||
}
|
||||
|
||||
bump() {
|
||||
bump_assets $1
|
||||
bump_gemspec $1
|
||||
bump_node $1
|
||||
bump_assets "$1"
|
||||
bump_gemspec "$1"
|
||||
bump_node "$1"
|
||||
|
||||
if [[ -n $(git status . -s) ]]; then
|
||||
git add .
|
||||
|
|
Loading…
Reference in a new issue