-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
259 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Set default behavior to automatically normalize line endings. | ||
* text=auto | ||
|
||
# Force bash scripts to always use LF line endings so that if a repo is accessed | ||
# in Unix via a file share from Windows, the scripts will work. | ||
*.sh text eol=lf | ||
|
||
# Force batch scripts to always use CRLF line endings so that if a repo is accessed | ||
# in Windows via a file share from Linux, the scripts will work. | ||
*.{cmd,[cC][mM][dD]} text eol=crlf | ||
*.{bat,[bB][aA][tT]} text eol=crlf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary | ||
*.ico binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
_site | ||
.sass-cache | ||
.jekyll-cache | ||
.jekyll-metadata | ||
vendor | ||
|
||
# Bundler cache | ||
.bundle | ||
vendor | ||
Gemfile.lock | ||
|
||
# Jekyll cache | ||
.jekyll-cache | ||
_site | ||
|
||
# RubyGems | ||
*.gem | ||
|
||
# NPM dependencies | ||
node_modules | ||
package-lock.json | ||
|
||
# IDE configurations | ||
.idea | ||
|
||
# Misc | ||
assets/js/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "assets/lib"] | ||
path = assets/lib | ||
url = https://github.com/cotes2020/chirpy-static-assets.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# 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" | ||
# | ||
# - 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/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module Jekyll | ||
class CustomPosts < Generator | ||
safe true | ||
priority :high | ||
|
||
def generate(site) | ||
custom_files_path = "_posts" | ||
Dir.glob(File.join(site.source, custom_files_path, "**/*.md")).each do |post_file| | ||
process_post(site, post_file) | ||
end | ||
end | ||
|
||
def process_post(site, custom_file) | ||
post = Document.new(custom_file, { | ||
site: site, | ||
collection: site.collections['posts'] | ||
}) | ||
|
||
post.read | ||
|
||
post.data["slug"] = post.data["title"] | ||
site.collections['posts'].docs << post | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
# | ||
# Check for changed posts | ||
|
||
Jekyll::Hooks.register :posts, :post_init do |post| | ||
|
||
commit_num = `git rev-list --count HEAD "#{ post.path }"` | ||
|
||
if commit_num.to_i > 1 | ||
lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"` | ||
post.data['last_modified_at'] = lastmod_date | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
# the default layout is 'page' | ||
icon: fas fa-info-circle | ||
order: 4 | ||
--- | ||
|
||
> Add Markdown syntax content to file `_tabs/about.md`{: .filepath } and it will show up on this page. | ||
{: .prompt-tip } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
layout: archives | ||
icon: fas fa-archive | ||
order: 3 | ||
--- |
Oops, something went wrong.