diff --git a/.github/workflows/generate_site.yml b/.github/workflows/generate_site.yml index 4a95dbf..6bb3bd4 100644 --- a/.github/workflows/generate_site.yml +++ b/.github/workflows/generate_site.yml @@ -43,7 +43,7 @@ jobs: run: | gh release download $ISITE_VERSION --repo kemingy/isite -p '*Linux_x86_64*' --output isite.tar.gz tar zxf isite.tar.gz && mv isite /usr/local/bin - isite generate --user $USER --repo $REPO + isite generate --user $USER --repo $REPO --outpu content gh release download $ZOLA_VERSION --repo getzola/zola -p '*linux*' --output zola.tar.gz tar zxf zola.tar.gz && mv zola /usr/local/bin cd output && zola build --base-url $BASE_URL diff --git a/.gitignore b/.gitignore index 2d531a0..736832c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ __pycache__ nohup.out .git-credentials venv/ + +draft/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..338feb1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "themes/serene"] + path = themes/serene + url = https://github.com/isunjn/serene.git + branch = latest diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..0c79bc8 --- /dev/null +++ b/config.toml @@ -0,0 +1,94 @@ +# The URL the site will be built for +base_url = "https://shiyang07ca.github.io/gitblog" + +title = "shiyang" +default_language = "zh-cn" +description = "Aha" +theme = "serene" + +output_dir = "public" + +# Whether to automatically compile all Sass files in the sass directory +compile_sass = true + +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = false + +# RSS +generate_feed = true +generate_rss = true +feed_filename = "feed.xml" # The file name of feed, "feed.xml" / "atom.xml" / "rss.xml", read docs for more info +taxonomies = [{ name = "tags" }, { name = "categories" }] + + +[markdown] +# When set to "true", all code blocks are highlighted. +highlight_code = true +highlight_theme = "css" +extra_syntaxes_and_themes = ["highlight_themes"] +highlight_themes_css = [ + { theme = "serene-light", filename = "hl-light.css"}, + { theme = "serene-dark", filename = "hl-dark.css"}, +] +render_emoji = false +external_links_target_blank = false +external_links_no_follow = true +external_links_no_referrer = true +smart_punctuation = true + +[slugify] +paths = "on" +taxonomies = "on" +anchors = "on" + +#========================================================================================= + +[extra] + +name = "shiyang07ca" # Your name +id = "shiyang07ca" # Your id / username / handle +bio = "Aha" # Your bio +# avatar = "img/avatar.webp" # Your avatar +# links = [ # Your links +# { name = "GitHub", icon = "github", url = "https://github.com/" }, +# { name = "Twitter", icon = "twitter", url = "https://twitter.com/" }, +# { name = "Email", icon = "email", url = "mailto:" }, +# ] + +homepage_layout = "about" # "about" | "list" + +sections = [ + { name = "blog", path = "/blog", is_external = false }, + # { name = "projects", path = "/projects", is_external = false }, + # { name = "about", path = "/about", is_external = false }, + # { name = "github", path = "https://github.com/", is_external = true }, +] +blog_section_path = "/blog" + +nav_separator = "::" +nav_wrapper_left = "{" +nav_wrapper_right = "} ;" +nav_wrapper_separator = "," + +display_id = true # Whether to display your id on homepage +blog_categorized = true # Whether to categorize blog posts +blur_effect = true # Whether to turn on blur effect on navigation bar +back_to_top = true # Whether to show back-to-top button on post pages + +toc = true # Whether to show Table-Of-Contents by default +copy = true # Whether to add a copy button on code blocks by default +comment = false # Whether to show giscus comment section by default, see https://giscus.app for more info +display_tags = true # Whether to display tags on post pages by default +truncate_summary = false # Whether to truncate the summary of a post by default + +outdate_alert = false # Whether to show outdate alert by default +outdate_alert_days = 120 # How many days will a post be outdated by default +outdate_alert_text_before = "This article was last updated " +outdate_alert_text_after = " days ago and may be out of date." + +footer_copyright = "© 2023 " +footer_credits = true # Whether to show "powered by zola and serene" in footer + +not_found_title = "404" +not_found_error_text = "Not Found" +not_found_recover_text = "« back to home »" diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..cbd675f --- /dev/null +++ b/content/_index.md @@ -0,0 +1,8 @@ ++++ +template = 'home.html' + +[extra] +lang = 'zh-cn' ++++ + +Words about you diff --git a/content/blog/.#_index.md b/content/blog/.#_index.md new file mode 120000 index 0000000..1bc3433 --- /dev/null +++ b/content/blog/.#_index.md @@ -0,0 +1 @@ +shiyang@shiyang.local.33549 \ No newline at end of file diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..0fa9a51 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,12 @@ ++++ +title = "My Blog" +description = "My blog site." +sort_by = "date" +template = "blog.html" +page_template = "post.html" +insert_anchor_links = "right" +generate_feed = true + +[extra] +lang = 'zh-cn' ++++ diff --git a/main.py b/main.py index fbd15bc..535dddd 100644 --- a/main.py +++ b/main.py @@ -3,10 +3,10 @@ import os import re -from marko.ext.gfm import gfm as marko -from github import Github from feedgen.feed import FeedGenerator +from github import Github from lxml.etree import CDATA +from marko.ext.gfm import gfm as marko MD_HEAD = """## Gitblog My personal blog using issues and GitHub Actions (随意转载,无需署名) diff --git a/themes/serene b/themes/serene new file mode 160000 index 0000000..fff685b --- /dev/null +++ b/themes/serene @@ -0,0 +1 @@ +Subproject commit fff685b3b66fd3e8fe5ed8887ad4c7fdfa0f0c09