Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
lsx-qit committed Jan 12, 2025
0 parents commit 066f620
Show file tree
Hide file tree
Showing 20 changed files with 879 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 构建到 gh-pages 分支

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write
id-token: write
pages: write

concurrency:
group: 'pages'
cancel-in-progress: false

defaults:
run:
shell: bash

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: 检出代码
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 安装 zola
uses: taiki-e/install-action@v2
with:
tool: zola@latest

- name: 构建 Zola 站点
run: zola build

- name: 列出构建输出目录内容
run: ls -la ./public

- name: 部署到 gh-pages 分支
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
commit_message: 'Build and deploy to gh-pages'
publish_branch: gh-pages
50 changes: 50 additions & 0 deletions .github/workflows/deploy-to-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 部署到 Github Pages

on:
workflow_run:
workflows: ["构建到 gh-pages 分支"]
types:
- completed

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: false

defaults:
run:
shell: bash

jobs:
upload:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest

steps:
- name: 检出代码
uses: actions/checkout@v4
with:
ref: gh-pages

- name: 输出当前产物
run: ls -la ./

- name: 上传构建产物
uses: actions/upload-pages-artifact@v3
with:
path: ./

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: upload
steps:
- name: 部署 GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/after-dark"]
path = themes/after-dark
url = https://github.com/getzola/after-dark
30 changes: 30 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# The URL the site will be built for
base_url = "https://dbthreee.github.io/zola"

# 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 = true

theme = 'after-dark'

title = 'dbthreee site with zola'

taxonomies = [
{name = "categories", feed = true},
{name = "tags", feed = true},
]

[markdown]
highlight_code = true

[extra]
# Put all your custom variables here
after_dark_title = "dbthreee blog with zola"
after_dark_menu = [
{url = "$BASE_URL", name = "Home"},
{url = "$BASE_URL/categories", name = "Categories"},
{url = "$BASE_URL/tags", name = "Tags"},
{url = "https://google.com", name = "Google"},
]
11 changes: 11 additions & 0 deletions content/2024-11-02-my-new-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: My New Post
date: 2024-11-02
tags:
- example
- tutorial
---

# My New Post

This is the content of my new post. You can write your text here using Markdown syntax.
5 changes: 5 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
paginate_by: 5
draft: false
sort_by: 'date'
---
Empty file added public/.gitkeep
Empty file.
52 changes: 52 additions & 0 deletions public/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">



<title>

dbthreee site with zola

</title>


<link rel="stylesheet" href="https://dbthreee.github.io/zola/site.css">




</head>

<body class="hack dark main container">

<main style="text-align: center;">
<h1>404 - NOT FOUND</h1>
<p>Page not found. Sorry about that.</p>
<p>Maybe try the <a href="https://dbthreee.github.io/zola">homepage</a>?</p>

<p>
For troubleshooting, refer to the <a href="https://www.getzola.org/documentation/getting-started/overview/"
target="_blank" rel="noopener">Zola documentation</a>.
</p>
</main>


<!-- optional scripts -->








</body>

</html>
10 changes: 10 additions & 0 deletions public/elasticlunr.min.js

Large diffs are not rendered by default.

115 changes: 115 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">



<title>dbthreee site with zola</title>


<link rel="stylesheet" href="https://dbthreee.github.io/zola/site.css">




</head>

<body class="hack dark main container">



<header class="nav-header">
<nav itemscope itemtype="http://schema.org/SiteNavigationElement" class="navbar">
<div class="nav-links">

<a itemprop="url"
class=""
href="https://dbthreee.github.io/zola">
<span itemprop="name">Home</span></a>

<a itemprop="url"
class=""
href="https://dbthreee.github.io/zola/categories">
<span itemprop="name">Categories</span></a>

<a itemprop="url"
class=""
href="https://dbthreee.github.io/zola/tags">
<span itemprop="name">Tags</span></a>

<a itemprop="url"
class=""
href="https://google.com">
<span itemprop="name">Google</span></a>

</div>
</nav>


</header>



<main>

<header>
<h1>dbthreee blog with zola</h1>
</header>



<article itemscope itemtype="http://schema.org/CreativeWork">
<header>
<h2 itemprop="name">
<a href="https://dbthreee.github.io/zola/my-new-post/">My New Post</a>
</h2>
<span class="muted">
<svg class="icon i-clock" viewBox="0 0 32 32"
width="16" height="16" fill="none" stroke="currentcolor"
stroke-linecap="round" stroke-linejoin="round" stroke-width="6.25%">
<circle cx="16" cy="16" r="14"/>
<path d="M16 8 L16 16 20 20"/>
</svg>
<span>1 minute read</span>
<svg class="icon i-edit" viewBox="0 0 32 32"
width="16" height="16" fill="none" stroke="currentcolor"
stroke-linecap="round" stroke-linejoin="round" stroke-width="6.25%">
<path d="M30 7 L25 2 5 22 3 29 10 27 Z M21 6 L26 11 Z M5 22 L10 27 Z"/>
</svg>

Published: 2024-11-02
</span>
</header>

</article>



<nav>
<p>

<span>Page 1 of 1</span>

</p>
</nav>
</main>


<!-- optional scripts -->








</body>

</html>
Loading

0 comments on commit 066f620

Please sign in to comment.