From 10ed9fc87a868b45cfc1caf746e6d2ace5a963ef Mon Sep 17 00:00:00 2001 From: WncFht <2130212584@qq.com> Date: Sun, 10 Nov 2024 19:46:04 +0800 Subject: [PATCH] add workflow --- .github/workflows/hugo.yaml | 78 +++++ assets/css/extended/blank.css | 6 + .../css/extended/chroma-styles-overrides.css | 175 +++++++++++ content/about.md | 22 ++ content/archives.md | 6 + content/posts/test.md | 8 + content/search.md | 6 + hugo.yaml | 82 ++++- layouts/_default/about.html | 17 + layouts/partials/comments.html | 48 +++ layouts/partials/extended_head.html | 9 + layouts/partials/mathjax.html | 35 +++ public/404.html | 68 +++- public/about/index.html | 279 +++++++++++++++++ public/archives/index.html | 287 +++++++++++++++++ ...674c67c60b761408f0327d8553f28a2a5c3618.css | 7 + ...5b0e42844ecc71b6abc56ecf0f5227c735c9dd.css | 7 + ...1d55e18412d71505f742c83b768f20363f9b399.js | 19 ++ ...465151de109ad6fd9693d49942b02c87b23a207.js | 19 ++ ...cc413ab76a9bc570a0d43cc17c3e817876484c3.js | 19 ++ public/categories/index.html | 73 ++++- public/categories/index.xml | 19 +- .../index.html" | 235 ++++++++++++++ .../index.xml" | 20 ++ .../page/1/index.html" | 10 + public/content/index.html | 225 +++++++++++++ public/index.html | 97 +++++- public/index.json | 1 + public/index.xml | 26 +- public/page/1/index.html | 8 +- public/posts/index.html | 250 +++++++++++++++ public/posts/index.xml | 20 ++ public/posts/page/1/index.html | 10 + public/posts/test/index.html | 295 ++++++++++++++++++ public/robots.txt | 3 + public/search/index.html | 278 +++++++++++++++++ public/sitemap.xml | 30 +- public/tags/bilibili/index.html | 235 ++++++++++++++ public/tags/bilibili/index.xml | 20 ++ public/tags/bilibili/page/1/index.html | 10 + public/tags/index.html | 76 ++++- public/tags/index.xml | 26 +- .../index.html" | 235 ++++++++++++++ .../index.xml" | 20 ++ .../page/1/index.html" | 10 + 45 files changed, 3340 insertions(+), 89 deletions(-) create mode 100644 .github/workflows/hugo.yaml create mode 100644 assets/css/extended/blank.css create mode 100644 assets/css/extended/chroma-styles-overrides.css create mode 100644 content/about.md create mode 100644 content/archives.md create mode 100644 content/posts/test.md create mode 100644 content/search.md create mode 100644 layouts/_default/about.html create mode 100644 layouts/partials/comments.html create mode 100644 layouts/partials/extended_head.html create mode 100644 layouts/partials/mathjax.html create mode 100644 public/about/index.html create mode 100644 public/archives/index.html create mode 100644 public/assets/css/stylesheet.7a93f8eea0a142df78131372a7674c67c60b761408f0327d8553f28a2a5c3618.css create mode 100644 public/assets/css/stylesheet.abe69d21f29b17db9183aa43655b0e42844ecc71b6abc56ecf0f5227c735c9dd.css create mode 100644 public/assets/js/search.4f560f52e388bc4d992ed39711d55e18412d71505f742c83b768f20363f9b399.js create mode 100644 public/assets/js/search.562ecbcc0c0783aee96a528c5465151de109ad6fd9693d49942b02c87b23a207.js create mode 100644 public/assets/js/search.9eef5433ec8e0bdb32d967b39cc413ab76a9bc570a0d43cc17c3e817876484c3.js create mode 100644 "public/categories/\351\200\232\347\224\250\346\212\200\346\234\257/index.html" create mode 100644 "public/categories/\351\200\232\347\224\250\346\212\200\346\234\257/index.xml" create mode 100644 "public/categories/\351\200\232\347\224\250\346\212\200\346\234\257/page/1/index.html" create mode 100644 public/content/index.html create mode 100644 public/index.json create mode 100644 public/posts/index.html create mode 100644 public/posts/index.xml create mode 100644 public/posts/page/1/index.html create mode 100644 public/posts/test/index.html create mode 100644 public/robots.txt create mode 100644 public/search/index.html create mode 100644 public/tags/bilibili/index.html create mode 100644 public/tags/bilibili/index.xml create mode 100644 public/tags/bilibili/page/1/index.html create mode 100644 "public/tags/\345\215\232\345\256\242\346\220\255\345\273\272/index.html" create mode 100644 "public/tags/\345\215\232\345\256\242\346\220\255\345\273\272/index.xml" create mode 100644 "public/tags/\345\215\232\345\256\242\346\220\255\345\273\272/page/1/index.html" diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml new file mode 100644 index 0000000..e0078e4 --- /dev/null +++ b/.github/workflows/hugo.yaml @@ -0,0 +1,78 @@ +# Sample workflow for building and deploying a Hugo site to GitHub Pages +name: Deploy Hugo site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: + - main + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +# Default to bash +defaults: + run: + shell: bash + +jobs: + # Build job + build: + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.138.0 + steps: + - name: Install Hugo CLI + run: | + wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Install Dart Sass + run: sudo snap install dart-sass + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Install Node.js dependencies + run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" + - name: Build with Hugo + env: + HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache + HUGO_ENVIRONMENT: production + TZ: America/Los_Angeles + run: | + hugo \ + --gc \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./public + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/assets/css/extended/blank.css b/assets/css/extended/blank.css new file mode 100644 index 0000000..74d8347 --- /dev/null +++ b/assets/css/extended/blank.css @@ -0,0 +1,6 @@ +.post-content pre, +code { + font-family: "JetBrains Mono", monospace; + font-size: 1rem; + line-height: 1.2; +} \ No newline at end of file diff --git a/assets/css/extended/chroma-styles-overrides.css b/assets/css/extended/chroma-styles-overrides.css new file mode 100644 index 0000000..6006942 --- /dev/null +++ b/assets/css/extended/chroma-styles-overrides.css @@ -0,0 +1,175 @@ +/* Background */ .bg { color:#3760bf;background-color:#e1e2e7; } +/* PreWrapper */ .chroma { color:#3760bf;background-color:#e1e2e7; } +/* Other */ .chroma .x { color: #000 } +/* Error */ .chroma .err { color:#c64343 } +/* CodeLine */ .chroma .cl { color: #000 } +/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit } +/* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; } +/* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; } +/* LineHighlight */ .chroma .hl { background-color:#a1a6c5 } +/* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6172b0 } +/* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6172b0 } +/* Line */ .chroma .line { display:flex; } +/* Keyword */ .chroma .k { color:#9854f1 } +/* KeywordConstant */ .chroma .kc { color:#8c6c3e } +/* KeywordDeclaration */ .chroma .kd { color:#9d7cd8 } +/* KeywordNamespace */ .chroma .kn { color:#007197 } +/* KeywordPseudo */ .chroma .kp { color:#9854f1 } +/* KeywordReserved */ .chroma .kr { color:#9854f1 } +/* KeywordType */ .chroma .kt { color:#0db9d7 } +/* Name */ .chroma .n { color: #000 } +/* NameAttribute */ .chroma .na { color:#2e7de9 } +/* NameBuiltin */ .chroma .nb { color:#587539 } +/* NameBuiltinPseudo */ .chroma .bp { color:#587539 } +/* NameClass */ .chroma .nc { color:#b15c00 } +/* NameConstant */ .chroma .no { color:#b15c00 } +/* NameDecorator */ .chroma .nd { color:#2e7de9;font-weight:bold } +/* NameEntity */ .chroma .ni { color:#007197 } +/* NameException */ .chroma .ne { color:#8c6c3e } +/* NameFunction */ .chroma .nf { color:#2e7de9 } +/* NameFunctionMagic */ .chroma .fm { color:#2e7de9 } +/* NameLabel */ .chroma .nl { color:#587539 } +/* NameNamespace */ .chroma .nn { color:#8c6c3e } +/* NameOther */ .chroma .nx { color: #000 } +/* NameProperty */ .chroma .py { color:#8c6c3e } +/* NameTag */ .chroma .nt { color:#9854f1 } +/* NameVariable */ .chroma .nv { color: #000 } +/* NameVariableClass */ .chroma .vc { color: #000 } +/* NameVariableGlobal */ .chroma .vg { color: #000 } +/* NameVariableInstance */ .chroma .vi { color: #000 } +/* NameVariableMagic */ .chroma .vm { color: #000 } +/* Literal */ .chroma .l { color: #000 } +/* LiteralDate */ .chroma .ld { color: #000 } +/* LiteralString */ .chroma .s { color:#587539 } +/* LiteralStringAffix */ .chroma .sa { color:#9d7cd8 } +/* LiteralStringBacktick */ .chroma .sb { color:#587539 } +/* LiteralStringChar */ .chroma .sc { color:#587539 } +/* LiteralStringDelimiter */ .chroma .dl { color:#2e7de9 } +/* LiteralStringDoc */ .chroma .sd { color:#a1a6c5 } +/* LiteralStringDouble */ .chroma .s2 { color:#587539 } +/* LiteralStringEscape */ .chroma .se { color:#2e7de9 } +/* LiteralStringHeredoc */ .chroma .sh { color:#a1a6c5 } +/* LiteralStringInterpol */ .chroma .si { color:#587539 } +/* LiteralStringOther */ .chroma .sx { color:#587539 } +/* LiteralStringRegex */ .chroma .sr { color:#007197 } +/* LiteralStringSingle */ .chroma .s1 { color:#587539 } +/* LiteralStringSymbol */ .chroma .ss { color:#587539 } +/* LiteralNumber */ .chroma .m { color:#8c6c3e } +/* LiteralNumberBin */ .chroma .mb { color:#8c6c3e } +/* LiteralNumberFloat */ .chroma .mf { color:#8c6c3e } +/* LiteralNumberHex */ .chroma .mh { color:#8c6c3e } +/* LiteralNumberInteger */ .chroma .mi { color:#8c6c3e } +/* LiteralNumberIntegerLong */ .chroma .il { color:#8c6c3e } +/* LiteralNumberOct */ .chroma .mo { color:#8c6c3e } +/* Operator */ .chroma .o { color:#587539;font-weight:bold } +/* OperatorWord */ .chroma .ow { color:#587539;font-weight:bold } +/* Punctuation */ .chroma .p { color: #000 } +/* Comment */ .chroma .c { color:#a1a6c5;font-style:italic } +/* CommentHashbang */ .chroma .ch { color:#a1a6c5;font-style:italic } +/* CommentMultiline */ .chroma .cm { color:#a1a6c5;font-style:italic } +/* CommentSingle */ .chroma .c1 { color:#a1a6c5;font-style:italic } +/* CommentSpecial */ .chroma .cs { color:#a1a6c5;font-style:italic } +/* CommentPreproc */ .chroma .cp { color:#a1a6c5;font-style:italic } +/* CommentPreprocFile */ .chroma .cpf { color:#a1a6c5;font-weight:bold;font-style:italic } +/* Generic */ .chroma .g { color: #000 } +/* GenericDeleted */ .chroma .gd { color:#c64343;background-color:#e9e9ed } +/* GenericEmph */ .chroma .ge { font-style:italic } +/* GenericError */ .chroma .gr { color:#c64343 } +/* GenericHeading */ .chroma .gh { color:#8c6c3e;font-weight:bold } +/* GenericInserted */ .chroma .gi { color:#587539;background-color:#e9e9ed } +/* GenericOutput */ .chroma .go { color: #000 } +/* GenericPrompt */ .chroma .gp { color: #000 } +/* GenericStrong */ .chroma .gs { font-weight:bold } +/* GenericSubheading */ .chroma .gu { color:#8c6c3e;font-weight:bold } +/* GenericTraceback */ .chroma .gt { color:#c64343 } +/* GenericUnderline */ .chroma .gl { text-decoration:underline } +/* TextWhitespace */ .chroma .w { color: #000 } + +.dark { + /* Background */ .bg { color:#e6edf3;background-color:#0d1117; } + /* PreWrapper */ .chroma { color:#e6edf3;background-color:#0d1117; } + /* Other */ .chroma .x { color: #fff } + /* Error */ .chroma .err { color:#f85149 } + /* CodeLine */ .chroma .cl { color: #fff } + /* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit } + /* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; } + /* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; } + /* LineHighlight */ .chroma .hl { background-color:#6e7681 } + /* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#737679 } + /* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681 } + /* Line */ .chroma .line { display:flex; } + /* Keyword */ .chroma .k { color:#ff7b72 } + /* KeywordConstant */ .chroma .kc { color:#79c0ff } + /* KeywordDeclaration */ .chroma .kd { color:#ff7b72 } + /* KeywordNamespace */ .chroma .kn { color:#ff7b72 } + /* KeywordPseudo */ .chroma .kp { color:#79c0ff } + /* KeywordReserved */ .chroma .kr { color:#ff7b72 } + /* KeywordType */ .chroma .kt { color:#ff7b72 } + /* Name */ .chroma .n { color: #fff } + /* NameAttribute */ .chroma .na { color: #fff } + /* NameBuiltin */ .chroma .nb { color: #fff } + /* NameBuiltinPseudo */ .chroma .bp { color: #fff } + /* NameClass */ .chroma .nc { color:#f0883e;font-weight:bold } + /* NameConstant */ .chroma .no { color:#79c0ff;font-weight:bold } + /* NameDecorator */ .chroma .nd { color:#d2a8ff;font-weight:bold } + /* NameEntity */ .chroma .ni { color:#ffa657 } + /* NameException */ .chroma .ne { color:#f0883e;font-weight:bold } + /* NameFunction */ .chroma .nf { color:#d2a8ff;font-weight:bold } + /* NameFunctionMagic */ .chroma .fm { color: #fff } + /* NameLabel */ .chroma .nl { color:#79c0ff;font-weight:bold } + /* NameNamespace */ .chroma .nn { color:#ff7b72 } + /* NameOther */ .chroma .nx { color: #fff } + /* NameProperty */ .chroma .py { color:#79c0ff } + /* NameTag */ .chroma .nt { color:#7ee787 } + /* NameVariable */ .chroma .nv { color:#79c0ff } + /* NameVariableClass */ .chroma .vc { color: #fff } + /* NameVariableGlobal */ .chroma .vg { color: #fff } + /* NameVariableInstance */ .chroma .vi { color: #fff } + /* NameVariableMagic */ .chroma .vm { color: #fff } + /* Literal */ .chroma .l { color:#a5d6ff } + /* LiteralDate */ .chroma .ld { color:#79c0ff } + /* LiteralString */ .chroma .s { color:#a5d6ff } + /* LiteralStringAffix */ .chroma .sa { color:#79c0ff } + /* LiteralStringBacktick */ .chroma .sb { color:#a5d6ff } + /* LiteralStringChar */ .chroma .sc { color:#a5d6ff } + /* LiteralStringDelimiter */ .chroma .dl { color:#79c0ff } + /* LiteralStringDoc */ .chroma .sd { color:#a5d6ff } + /* LiteralStringDouble */ .chroma .s2 { color:#a5d6ff } + /* LiteralStringEscape */ .chroma .se { color:#79c0ff } + /* LiteralStringHeredoc */ .chroma .sh { color:#79c0ff } + /* LiteralStringInterpol */ .chroma .si { color:#a5d6ff } + /* LiteralStringOther */ .chroma .sx { color:#a5d6ff } + /* LiteralStringRegex */ .chroma .sr { color:#79c0ff } + /* LiteralStringSingle */ .chroma .s1 { color:#a5d6ff } + /* LiteralStringSymbol */ .chroma .ss { color:#a5d6ff } + /* LiteralNumber */ .chroma .m { color:#a5d6ff } + /* LiteralNumberBin */ .chroma .mb { color:#a5d6ff } + /* LiteralNumberFloat */ .chroma .mf { color:#a5d6ff } + /* LiteralNumberHex */ .chroma .mh { color:#a5d6ff } + /* LiteralNumberInteger */ .chroma .mi { color:#a5d6ff } + /* LiteralNumberIntegerLong */ .chroma .il { color:#a5d6ff } + /* LiteralNumberOct */ .chroma .mo { color:#a5d6ff } + /* Operator */ .chroma .o { color:#ff7b72;font-weight:bold } + /* OperatorWord */ .chroma .ow { color:#ff7b72;font-weight:bold } + /* Punctuation */ .chroma .p { color: #fff } + /* Comment */ .chroma .c { color:#8b949e;font-style:italic } + /* CommentHashbang */ .chroma .ch { color:#8b949e;font-style:italic } + /* CommentMultiline */ .chroma .cm { color:#8b949e;font-style:italic } + /* CommentSingle */ .chroma .c1 { color:#8b949e;font-style:italic } + /* CommentSpecial */ .chroma .cs { color:#8b949e;font-weight:bold;font-style:italic } + /* CommentPreproc */ .chroma .cp { color:#8b949e;font-weight:bold;font-style:italic } + /* CommentPreprocFile */ .chroma .cpf { color:#8b949e;font-weight:bold;font-style:italic } + /* Generic */ .chroma .g { color: #fff } + /* GenericDeleted */ .chroma .gd { color:#ffa198;background-color:#490202 } + /* GenericEmph */ .chroma .ge { font-style:italic } + /* GenericError */ .chroma .gr { color:#ffa198 } + /* GenericHeading */ .chroma .gh { color:#79c0ff;font-weight:bold } + /* GenericInserted */ .chroma .gi { color:#56d364;background-color:#0f5323 } + /* GenericOutput */ .chroma .go { color:#8b949e } + /* GenericPrompt */ .chroma .gp { color:#8b949e } + /* GenericStrong */ .chroma .gs { font-weight:bold } + /* GenericSubheading */ .chroma .gu { color:#79c0ff } + /* GenericTraceback */ .chroma .gt { color:#ff7b72 } + /* GenericUnderline */ .chroma .gl { text-decoration:underline } + /* TextWhitespace */ .chroma .w { color:#6e7681 } + } \ No newline at end of file diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..3b9d0e4 --- /dev/null +++ b/content/about.md @@ -0,0 +1,22 @@ +--- +title: "关于" +layout: "about" +url: "/about/" +summary: about +--- + +行内数学公式:$a^2 + b^2 = c^2$。 + +块公式, + +$$a^2 + b^2 = c^2$$ + +