Merge branch 'dev' of rajukottedi/chirpy-blogging into prod
This commit is contained in:
commit
77714e38b2
8
.github/workflows/pages-deploy.yml
vendored
8
.github/workflows/pages-deploy.yml
vendored
@ -37,12 +37,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
id: pages
|
id: pages
|
||||||
uses: actions/configure-pages@v3
|
uses: actions/configure-pages@v4
|
||||||
|
|
||||||
- name: Setup Ruby
|
- name: Setup Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 3
|
ruby-version: 3.2
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Build site
|
- name: Build site
|
||||||
@ -57,7 +57,7 @@ jobs:
|
|||||||
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
\-\-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@v3
|
||||||
with:
|
with:
|
||||||
path: "_site${{ steps.pages.outputs.base_path }}"
|
path: "_site${{ steps.pages.outputs.base_path }}"
|
||||||
|
|
||||||
@ -70,4 +70,4 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v2
|
uses: actions/deploy-pages@v4
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,7 +16,6 @@ package-lock.json
|
|||||||
|
|
||||||
# IDE configurations
|
# IDE configurations
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
assets/js/dist
|
assets/js/dist
|
||||||
|
|||||||
5
Gemfile
5
Gemfile
@ -21,8 +21,3 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
|
|||||||
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
|
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
|
||||||
# do not have a Java counterpart.
|
# do not have a Java counterpart.
|
||||||
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
|
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
|
||||||
|
|
||||||
# Lock jekyll-sass-converter to 2.x on Linux-musl
|
|
||||||
if RUBY_PLATFORM =~ /linux-musl/
|
|
||||||
gem "jekyll-sass-converter", "~> 2.0"
|
|
||||||
end
|
|
||||||
|
|||||||
99
README.md
99
README.md
@ -1,56 +1,81 @@
|
|||||||
# Chirpy Starter
|
<div align="center">
|
||||||
|
|
||||||
[][gem]
|
# Chirpy Jekyll Theme
|
||||||
[][mit]
|
|
||||||
|
|
||||||
When installing the [**Chirpy**][chirpy] theme through [RubyGems.org][gem], Jekyll can only read files in the folders
|
A minimal, responsive, and feature-rich Jekyll theme for technical writing.
|
||||||
`_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.
|
|
||||||
|
|
||||||
The Jekyll team claims that this is to leave the ball in the user’s court, but this also results in users not being
|
[][gem]
|
||||||
able to enjoy the out-of-the-box experience when using feature-rich themes.
|
[][ci]
|
||||||
|
[][codacy]
|
||||||
|
[][license]
|
||||||
|
[](https://996.icu)
|
||||||
|
|
||||||
To fully use all the features of **Chirpy**, you need to copy the other critical files from the theme's gem to your
|
[**Live Demo** →][demo]
|
||||||
Jekyll site. The following is a list of targets:
|
|
||||||
|
|
||||||
```shell
|
[][demo]
|
||||||
.
|
|
||||||
├── _config.yml
|
|
||||||
├── _plugins
|
|
||||||
├── _tabs
|
|
||||||
└── index.html
|
|
||||||
```
|
|
||||||
|
|
||||||
To save you time, and also in case you lose some files while copying, we extract those files/configurations of the
|
</div>
|
||||||
latest version of the **Chirpy** theme and the [CD][CD] workflow to here, so that you can start writing in minutes.
|
|
||||||
|
|
||||||
## Prerequisites
|
## Features
|
||||||
|
|
||||||
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of
|
- Dark / Light Theme Mode
|
||||||
the basic environment. [Git](https://git-scm.com/) also needs to be installed.
|
- Localized UI language
|
||||||
|
- Pinned Posts on Home Page
|
||||||
|
- Hierarchical Categories
|
||||||
|
- Trending Tags
|
||||||
|
- Table of Contents
|
||||||
|
- Last Modified Date
|
||||||
|
- Syntax Highlighting
|
||||||
|
- Mathematical Expressions
|
||||||
|
- Mermaid Diagrams & Flowcharts
|
||||||
|
- Dark / Light Mode Images
|
||||||
|
- Embed Videos
|
||||||
|
- Disqus / Giscus / Utterances Comments
|
||||||
|
- Built-in Search
|
||||||
|
- Atom Feeds
|
||||||
|
- PWA
|
||||||
|
- Google Analytics / GoatCounter
|
||||||
|
- SEO & Performance Optimization
|
||||||
|
|
||||||
## Installation
|
## Documentation
|
||||||
|
|
||||||
Sign in to GitHub and [**use this template**][use-template] to generate a brand new repository and name it
|
To learn how to use, develop, and upgrade the project, please refer to the [Wiki][wiki].
|
||||||
`USERNAME.github.io`, where `USERNAME` represents your GitHub username.
|
|
||||||
|
|
||||||
Then clone it to your local machine and run:
|
## Contributing
|
||||||
|
|
||||||
```console
|
Contributions (_pull requests_, _issues_, and _discussions_) are what make the open-source community such an amazing place
|
||||||
$ bundle
|
to learn, inspire, and create. Any contributions you make are greatly appreciated.
|
||||||
```
|
For details, see the "[Contributing Guidelines][contribute-guide]".
|
||||||
|
|
||||||
## Usage
|
## Credits
|
||||||
|
|
||||||
Please see the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy#documentation).
|
### Contributors
|
||||||
|
|
||||||
|
Thanks to [all the contributors][contributors] involved in the development of the project!
|
||||||
|
|
||||||
|
[][contributors]
|
||||||
|
<sub> —— Made with [contrib.rocks](https://contrib.rocks)</sub>
|
||||||
|
|
||||||
|
### Third-Party Assets
|
||||||
|
|
||||||
|
This project is built on the [Jekyll][jekyllrb] ecosystem and some [great libraries][lib], and is developed using [VS Code][vscode] as well as tools provided by [JetBrains][jetbrains] under a non-commercial open-source software license.
|
||||||
|
|
||||||
|
The avatar and favicon for the project's website are from [ClipartMAX][clipartmax].
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This work is published under [MIT][mit] License.
|
This project is published under [MIT License][license].
|
||||||
|
|
||||||
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy
|
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy
|
||||||
[chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/
|
[ci]: https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml?query=event%3Apush+branch%3Amaster
|
||||||
[use-template]: https://github.com/cotes2020/chirpy-starter/generate
|
[codacy]: https://app.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
|
||||||
[CD]: https://en.wikipedia.org/wiki/Continuous_deployment
|
[license]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE
|
||||||
[mit]: https://github.com/cotes2020/chirpy-starter/blob/master/LICENSE
|
[jekyllrb]: https://jekyllrb.com/
|
||||||
|
[clipartmax]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/
|
||||||
|
[demo]: https://cotes2020.github.io/chirpy-demo/
|
||||||
|
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
|
||||||
|
[contribute-guide]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md
|
||||||
|
[contributors]: https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors
|
||||||
|
[lib]: https://github.com/cotes2020/chirpy-static-assets
|
||||||
|
[vscode]: https://code.visualstudio.com/
|
||||||
|
[jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||||
35
_config.yml
35
_config.yml
@ -4,10 +4,6 @@ id: 'blog-dev'
|
|||||||
# Import the theme
|
# Import the theme
|
||||||
theme: jekyll-theme-chirpy
|
theme: jekyll-theme-chirpy
|
||||||
|
|
||||||
# Change the following value to '/PROJECT_NAME' ONLY IF your site type is GitHub Pages Project sites
|
|
||||||
# and doesn't have a custom domain.
|
|
||||||
baseurl: "/blog"
|
|
||||||
|
|
||||||
# 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'.
|
||||||
@ -26,7 +22,8 @@ tagline: Only Blogging Nothing More or Less # 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
|
||||||
Through my articles and stories, I hope to guide you through the intricate world of technology, offer insights into automation's transformative power, unveil the secrets behind successful DIY projects, and encourage you to fearlessly pursue new skills.
|
Through my articles and stories, I hope to guide you through the intricate world of technology, offer insights into automation's transformative power, unveil the secrets behind successful DIY projects, and encourage you to fearlessly pursue new skills.
|
||||||
|
|
||||||
# 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', note that it does not end with a '/'.
|
||||||
url: "http://localhost:4000"
|
url: "http://localhost:4000"
|
||||||
|
|
||||||
github:
|
github:
|
||||||
@ -56,6 +53,9 @@ google_site_verification: # fill in to your verification string
|
|||||||
google_analytics:
|
google_analytics:
|
||||||
id: G-W2VG43SN3N # fill in your Google Analytics ID
|
id: G-W2VG43SN3N # fill in your Google Analytics ID
|
||||||
|
|
||||||
|
goatcounter:
|
||||||
|
id: # fill in your Goatcounter ID
|
||||||
|
|
||||||
# Prefer color scheme setting.
|
# Prefer color scheme setting.
|
||||||
#
|
#
|
||||||
# Note: Keep empty will follow the system prefer color by default,
|
# Note: Keep empty will follow the system prefer color by default,
|
||||||
@ -67,7 +67,7 @@ google_analytics:
|
|||||||
# light - Use the light color scheme
|
# light - Use the light color scheme
|
||||||
# dark - Use the dark color scheme
|
# dark - Use the dark color scheme
|
||||||
#
|
#
|
||||||
theme_mode: # [light|dark]
|
theme_mode: # [light | dark]
|
||||||
|
|
||||||
# The CDN endpoint for images.
|
# The CDN endpoint for images.
|
||||||
# Notice that once it is assigned, the CDN url
|
# Notice that once it is assigned, the CDN url
|
||||||
@ -79,6 +79,10 @@ img_cdn:
|
|||||||
# the avatar on sidebar, support local or CORS resources
|
# the avatar on sidebar, support local or CORS resources
|
||||||
avatar: /assets/img/avatar.jpg
|
avatar: /assets/img/avatar.jpg
|
||||||
|
|
||||||
|
# The URL of the site-wide social preview image used in SEO `og:image` meta tag.
|
||||||
|
# It can be overridden by a customized `page.image` in front matter.
|
||||||
|
social_preview_image: # string, local or CORS resources
|
||||||
|
|
||||||
# boolean type, the global switch for TOC in posts.
|
# boolean type, the global switch for TOC in posts.
|
||||||
toc: true
|
toc: true
|
||||||
|
|
||||||
@ -111,13 +115,23 @@ assets:
|
|||||||
enabled: # boolean, keep empty means false
|
enabled: # boolean, keep empty means false
|
||||||
# specify the Jekyll environment, empty means both
|
# specify the Jekyll environment, empty means both
|
||||||
# only works if `assets.self_host.enabled` is 'true'
|
# only works if `assets.self_host.enabled` is 'true'
|
||||||
env: # [development|production]
|
env: # [development | production]
|
||||||
|
|
||||||
pwa:
|
pwa:
|
||||||
enabled: true # the option for PWA feature
|
enabled: true # the option for PWA feature (installable)
|
||||||
|
cache:
|
||||||
|
enabled: true # the option for PWA offline cache
|
||||||
|
# Paths defined here will be excluded from the PWA cache.
|
||||||
|
# Usually its value is the `baseurl` of another website that
|
||||||
|
# shares the same domain name as the current website.
|
||||||
|
deny_paths:
|
||||||
|
# - "/example" # URLs match `<SITE_URL>/example/*` will not be cached by the PWA
|
||||||
|
|
||||||
paginate: 10
|
paginate: 10
|
||||||
|
|
||||||
|
# The base URL of your site
|
||||||
|
baseurl: "/blog"
|
||||||
|
|
||||||
# ------------ The following options are not recommended to be modified ------------------
|
# ------------ The following options are not recommended to be modified ------------------
|
||||||
|
|
||||||
kramdown:
|
kramdown:
|
||||||
@ -157,10 +171,6 @@ defaults:
|
|||||||
values:
|
values:
|
||||||
layout: page
|
layout: page
|
||||||
permalink: /:title/
|
permalink: /:title/
|
||||||
- scope:
|
|
||||||
path: assets/img/favicons
|
|
||||||
values:
|
|
||||||
swcache: true
|
|
||||||
- scope:
|
- scope:
|
||||||
path: assets/js/dist
|
path: assets/js/dist
|
||||||
values:
|
values:
|
||||||
@ -184,7 +194,6 @@ exclude:
|
|||||||
- docs
|
- docs
|
||||||
- tools
|
- tools
|
||||||
- README.md
|
- README.md
|
||||||
- CHANGELOG.md
|
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- rollup.config.js
|
- rollup.config.js
|
||||||
- package*.json
|
- package*.json
|
||||||
|
|||||||
@ -40,7 +40,7 @@ copyright:
|
|||||||
Except where otherwise noted, the blog posts on this site are licensed
|
Except where otherwise noted, the blog posts on this site are licensed
|
||||||
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author.
|
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author.
|
||||||
|
|
||||||
meta: Using the :PLATFORM theme :THEME
|
meta: Using the :THEME theme for :PLATFORM.
|
||||||
|
|
||||||
not_found:
|
not_found:
|
||||||
statment: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
|
statment: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
|
||||||
|
|||||||
@ -23,3 +23,16 @@ platforms:
|
|||||||
# - type: Weibo
|
# - type: Weibo
|
||||||
# icon: "fab fa-weibo"
|
# icon: "fab fa-weibo"
|
||||||
# link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"
|
# link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"
|
||||||
|
#
|
||||||
|
# - type: Mastodon
|
||||||
|
# icon: "fa-brands fa-mastodon"
|
||||||
|
# # See: https://github.com/justinribeiro/share-to-mastodon#properties
|
||||||
|
# instances:
|
||||||
|
# - label: mastodon.social
|
||||||
|
# link: "https://mastodon.social/"
|
||||||
|
# - label: mastodon.online
|
||||||
|
# link: "https://mastodon.online/"
|
||||||
|
# - label: fosstodon.org
|
||||||
|
# link: "https://fosstodon.org/"
|
||||||
|
# - label: photog.social
|
||||||
|
# link: "https://photog.social/"
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
title: Future Post
|
title: Future Post
|
||||||
date: 2023-07-23 0:00:00 +0530
|
date: 2023-07-23 0:00:00 +0530
|
||||||
|
tags: [test, self-hosted]
|
||||||
---
|
---
|
||||||
|
|
||||||
# Future Post Modified
|
# Future Post Modified
|
||||||
25
_drafts/2024-03-12-yaml-mcq.yml
Normal file
25
_drafts/2024-03-12-yaml-mcq.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
title: This is the Quiz Title
|
||||||
|
randomized: false
|
||||||
|
questions:
|
||||||
|
|
||||||
|
- type: "multiple-choice"
|
||||||
|
question: "What is your favorite color?"
|
||||||
|
items:
|
||||||
|
- choice: Red
|
||||||
|
correct: null
|
||||||
|
- choice: Blue
|
||||||
|
correct: null
|
||||||
|
- choice: Green
|
||||||
|
correct: null
|
||||||
|
followup: There is no correct answer to asking your favorite color! All choices would be good.
|
||||||
|
|
||||||
|
- type: "multiple-choice"
|
||||||
|
question: "True or False, Pittsburgh is West of Philadelphia"
|
||||||
|
items:
|
||||||
|
- choice: True
|
||||||
|
correct: true
|
||||||
|
- choice: False
|
||||||
|
correct: false
|
||||||
|
followup: |
|
||||||
|
The answer is True! Pittsburgh is 304.9 miles West of Philadelphia, or approximately
|
||||||
|
a car ride of 4 hours and 52 minutes. Buckle up!
|
||||||
@ -9,29 +9,43 @@
|
|||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
|
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
|
||||||
|
|
||||||
{% capture seo_tags %}
|
{%- capture seo_tags -%}
|
||||||
{% seo title=false %}
|
{% seo title=false %}
|
||||||
{% endcapture %}
|
{%- endcapture -%}
|
||||||
|
|
||||||
|
<!-- Setup Open Graph image -->
|
||||||
|
|
||||||
{% if page.image %}
|
{% if page.image %}
|
||||||
{% assign img = page.image.path | default: page.image %}
|
{% assign src = page.image.path | default: page.image %}
|
||||||
|
|
||||||
{% unless img contains '://' %}
|
{% unless src contains '://' %}
|
||||||
{% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
|
{%- capture img_url -%}
|
||||||
{% capture target %}"{{ img | absolute_url }}"{% endcapture %}
|
{% include img-url.html src=src img_path=page.img_path absolute=true %}
|
||||||
|
|
||||||
{% if site.img_cdn contains '//' %}
|
|
||||||
<!-- it's a cross-origin URL -->
|
|
||||||
{% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
|
|
||||||
{% else %}
|
|
||||||
<!-- it's a local file path -->
|
|
||||||
{%- capture replacement -%}
|
|
||||||
"{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
|
|
||||||
{%- endcapture -%}
|
{%- endcapture -%}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% assign seo_tags = seo_tags | replace: target, replacement %}
|
{%- capture old_url -%}{{ src | absolute_url }}{%- endcapture -%}
|
||||||
|
{%- capture new_url -%}{{ img_url }}{%- endcapture -%}
|
||||||
|
|
||||||
|
{% assign seo_tags = seo_tags | replace: old_url, new_url %}
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
|
|
||||||
|
{% elsif site.social_preview_image %}
|
||||||
|
{%- capture img_url -%}
|
||||||
|
{% include img-url.html src=site.social_preview_image absolute=true %}
|
||||||
|
{%- endcapture -%}
|
||||||
|
|
||||||
|
{%- capture og_image -%}
|
||||||
|
<meta property="og:image" content="{{ img_url }}" />
|
||||||
|
{%- endcapture -%}
|
||||||
|
|
||||||
|
{%- capture twitter_image -%}
|
||||||
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
<meta property="twitter:image" content="{{ img_url }}" />
|
||||||
|
{%- endcapture -%}
|
||||||
|
|
||||||
|
{% assign old_meta_clip = '<meta name="twitter:card" content="summary" />' %}
|
||||||
|
{% assign new_meta_clip = og_image | append: twitter_image %}
|
||||||
|
{% assign seo_tags = seo_tags | replace: old_meta_clip, new_meta_clip %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ seo_tags }}
|
{{ seo_tags }}
|
||||||
@ -67,7 +81,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Bootstrap -->
|
<!-- Bootstrap -->
|
||||||
<link rel="stylesheet" href="{{ site.data.origin[type].bootstrap.css | relative_url}}">
|
<link rel="stylesheet" href="{{ site.data.origin[type].bootstrap.css | relative_url }}">
|
||||||
|
|
||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
<link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}">
|
<link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}">
|
||||||
@ -78,6 +92,10 @@
|
|||||||
<link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}">
|
<link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
|
||||||
|
<link rel="stylesheet" href="{{ site.data.origin[type]['lazy-polyfill'].css | relative_url }}">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if page.layout == 'page' or page.layout == 'post' %}
|
{% if page.layout == 'page' or page.layout == 'post' %}
|
||||||
<!-- Manific Popup -->
|
<!-- Manific Popup -->
|
||||||
<link rel="stylesheet" href="{{ site.data.origin[type].magnific-popup.css | relative_url }}">
|
<link rel="stylesheet" href="{{ site.data.origin[type].magnific-popup.css | relative_url }}">
|
||||||
|
|||||||
@ -22,8 +22,8 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% include views.html tooltip=true onload=false lang=lang %}
|
{% include views.html tooltip=true onload=false lang=lang %}
|
||||||
{% include likes.html tooltip=true onload=false lang=lang %}
|
{% include likes.html tooltip=true onload=false lang=lang %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const views = document.getElementById("views-count");
|
const views = document.getElementById("views-count");
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: compress
|
layout: compress
|
||||||
# Default layout
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
@ -8,15 +7,8 @@ layout: compress
|
|||||||
{% include origin-type.html %}
|
{% include origin-type.html %}
|
||||||
|
|
||||||
{% include lang.html %}
|
{% include lang.html %}
|
||||||
|
|
||||||
{% capture prefer_mode %}
|
|
||||||
{% if site.theme_mode %}
|
{% if site.theme_mode %}
|
||||||
data-mode="{{ site.theme_mode }}"
|
{% capture prefer_mode %}data-mode="{{ site.theme_mode }}"{% endcapture %}
|
||||||
{% endif %}
|
|
||||||
{% endcapture %}
|
|
||||||
|
|
||||||
{% if layout.tail_includes %}
|
|
||||||
{% assign has_tail = true %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- `site.alt_lang` can specify a language different from the UI -->
|
<!-- `site.alt_lang` can specify a language different from the UI -->
|
||||||
@ -35,19 +27,20 @@ data-mode="{{ site.theme_mode }}"
|
|||||||
{% include sidebar.html lang=lang %}
|
{% include sidebar.html lang=lang %}
|
||||||
|
|
||||||
<div id="main-wrapper" class="d-flex justify-content-center">
|
<div id="main-wrapper" class="d-flex justify-content-center">
|
||||||
<div class="container px-xxl-5">
|
<div class="container d-flex flex-column px-xxl-5">
|
||||||
{% include topbar.html lang=lang %}
|
{% include topbar.html lang=lang %}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row flex-grow-1">
|
||||||
<main
|
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
||||||
aria-label="Main Content"
|
{% if layout.refactor or layout.layout == 'default' %}
|
||||||
class="col-12 col-lg-11 col-xl-9 px-md-4{% unless has_tail %} pb-5{% endunless %}"
|
{% include refactor-content.html content=content lang=lang %}
|
||||||
>
|
{% else %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
{% endif %}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<!-- panel -->
|
<!-- panel -->
|
||||||
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
|
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 mb-5 text-muted">
|
||||||
<div class="access">
|
<div class="access">
|
||||||
{% include_cached update-list.html lang=lang %}
|
{% include_cached update-list.html lang=lang %}
|
||||||
{% include_cached trending-tags.html lang=lang %}
|
{% include_cached trending-tags.html lang=lang %}
|
||||||
@ -63,14 +56,11 @@ data-mode="{{ site.theme_mode }}"
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- tail -->
|
<!-- tail -->
|
||||||
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
||||||
{% if has_tail %}
|
|
||||||
{% for _include in layout.tail_includes %}
|
{% for _include in layout.tail_includes %}
|
||||||
{% assign _include_path = _include | append: '.html' %}
|
{% assign _include_path = _include | append: '.html' %}
|
||||||
{% include {{ _include_path }} lang=lang %}
|
{% include {{ _include_path }} lang=lang %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% include related-posts.html lang=lang %}
|
|
||||||
{% include_cached footer.html lang=lang %}
|
{% include_cached footer.html lang=lang %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,21 +1,21 @@
|
|||||||
---
|
---
|
||||||
layout: page
|
layout: default
|
||||||
refactor: true
|
refactor: true
|
||||||
panel_includes:
|
panel_includes:
|
||||||
- toc
|
- toc
|
||||||
tail_includes:
|
tail_includes:
|
||||||
- related-posts
|
- related-posts
|
||||||
- post-nav
|
- post-nav
|
||||||
- comments
|
- comments
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
{% include lang.html %}
|
||||||
|
|
||||||
<header>
|
<article class="px-1">
|
||||||
|
<header>
|
||||||
<h1 data-toc-skip>{{ page.title }}</h1>
|
<h1 data-toc-skip>{{ page.title }}</h1>
|
||||||
|
|
||||||
<div class="post-meta text-muted">
|
<div class="post-meta text-muted">
|
||||||
|
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div>
|
<div>
|
||||||
<!-- published date -->
|
<!-- published date -->
|
||||||
@ -46,14 +46,12 @@ tail_includes:
|
|||||||
{% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %}
|
{% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %}
|
||||||
{% capture alt %}alt="{{ page.image.alt | xml_escape | default: "Preview Image" }}"{% endcapture %}
|
{% capture alt %}alt="{{ page.image.alt | xml_escape | default: "Preview Image" }}"{% endcapture %}
|
||||||
|
|
||||||
{% capture lqip %}
|
|
||||||
{% if page.image.lqip %}
|
{% if page.image.lqip %}
|
||||||
lqip="{{ page.image.lqip }}"
|
{%- capture lqip -%}lqip="{{ page.image.lqip }}"{%- endcapture -%}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endcapture %}
|
|
||||||
|
|
||||||
<div class="mt-3 mb-3">
|
<div class="mt-3 mb-3">
|
||||||
<img {{ src }} {{ class }} {{ alt }} w="1200" h="630" {{ lqip | strip }}>
|
<img {{ src }} {{ class }} {{ alt }} w="1200" h="630" {{ lqip }}>
|
||||||
{%- if page.image.alt -%}
|
{%- if page.image.alt -%}
|
||||||
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
@ -74,7 +72,11 @@ tail_includes:
|
|||||||
<em>
|
<em>
|
||||||
{% if authors %}
|
{% if authors %}
|
||||||
{% for author in authors %}
|
{% for author in authors %}
|
||||||
|
{% if site.data.authors[author].url -%}
|
||||||
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
|
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
|
||||||
|
{%- else -%}
|
||||||
|
{{ site.data.authors[author].name }}
|
||||||
|
{%- endif %}
|
||||||
{% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %}
|
{% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -85,24 +87,24 @@ tail_includes:
|
|||||||
|
|
||||||
<!-- read time -->
|
<!-- read time -->
|
||||||
{% include read-time.html content=content prompt=true lang=lang %}
|
{% include read-time.html content=content prompt=true lang=lang %}
|
||||||
</div> <!-- .d-flex -->
|
</div>
|
||||||
|
<!-- .d-flex -->
|
||||||
</div> <!-- .post-meta -->
|
</div>
|
||||||
</header>
|
<!-- .post-meta -->
|
||||||
|
</header>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="post-tail-wrapper text-muted">
|
<div class="post-tail-wrapper text-muted">
|
||||||
|
|
||||||
<!-- categories -->
|
<!-- categories -->
|
||||||
{% if page.categories.size > 0 %}
|
{% if page.categories.size > 0 %}
|
||||||
<div class="post-meta mb-3">
|
<div class="post-meta mb-3">
|
||||||
<i class="far fa-folder-open fa-fw me-1"></i>
|
<i class="far fa-folder-open fa-fw me-1"></i>
|
||||||
{% for category in page.categories %}
|
{% for category in page.categories %}
|
||||||
<a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a>
|
<a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a>
|
||||||
{%- unless forloop.last -%}, {%- endunless -%}
|
{%- unless forloop.last -%},{%- endunless -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -112,19 +114,24 @@ tail_includes:
|
|||||||
<div class="post-tags">
|
<div class="post-tags">
|
||||||
<i class="fa fa-tags fa-fw me-1"></i>
|
<i class="fa fa-tags fa-fw me-1"></i>
|
||||||
{% for tag in page.tags %}
|
{% for tag in page.tags %}
|
||||||
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/" class="post-tag no-text-decoration">
|
<a
|
||||||
|
href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
|
||||||
|
class="post-tag no-text-decoration"
|
||||||
|
>
|
||||||
{{- tag -}}
|
{{- tag -}}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="post-tail-bottom
|
<div
|
||||||
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
class="
|
||||||
|
post-tail-bottom
|
||||||
|
d-flex justify-content-between align-items-center mt-5 pb-2
|
||||||
|
"
|
||||||
|
>
|
||||||
<div class="license-wrapper">
|
<div class="license-wrapper">
|
||||||
|
|
||||||
{% if site.data.locales[lang].copyright.license.template %}
|
{% if site.data.locales[lang].copyright.license.template %}
|
||||||
|
|
||||||
{% capture _replacement %}
|
{% capture _replacement %}
|
||||||
<a href="{{ site.data.locales[lang].copyright.license.link }}">
|
<a href="{{ site.data.locales[lang].copyright.license.link }}">
|
||||||
{{ site.data.locales[lang].copyright.license.name }}
|
{{ site.data.locales[lang].copyright.license.name }}
|
||||||
@ -132,12 +139,12 @@ tail_includes:
|
|||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include post-sharing.html lang=lang %}
|
{% include post-sharing.html lang=lang %}
|
||||||
|
</div>
|
||||||
</div><!-- .post-tail-bottom -->
|
<!-- .post-tail-bottom -->
|
||||||
|
</div>
|
||||||
</div><!-- div.post-tail-wrapper -->
|
<!-- div.post-tail-wrapper -->
|
||||||
|
</article>
|
||||||
@ -4,11 +4,12 @@
|
|||||||
|
|
||||||
CREATE USER blog_admin@'%' IDENTIFIED BY 'pass@1234';
|
CREATE USER blog_admin@'%' IDENTIFIED BY 'pass@1234';
|
||||||
|
|
||||||
GRANT ALL PRIVILEGES ON blogDB.* TO blog_admin@'%';
|
GRANT ALL PRIVILEGES ON blogDB.* TO blog_admin@'192.168.0.%';
|
||||||
|
GRANT ALL PRIVILEGES ON blogDB.* TO blog_admin@'10.1.0.%';
|
||||||
|
|
||||||
SHOW GRANTS FOR blog_admin@'%';
|
SHOW GRANTS FOR blog_admin@'%';
|
||||||
|
|
||||||
FLUSH PRIVILEGES
|
FLUSH PRIVILEGES;
|
||||||
|
|
||||||
-- Create Counter Table
|
-- Create Counter Table
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user