diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml new file mode 100644 index 000000000..90e9412d9 --- /dev/null +++ b/.github/workflows/hugo.yml @@ -0,0 +1,75 @@ +# 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: ["master"] + + # 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.114.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@v3 + with: + submodules: recursive + - name: Setup Pages + id: pages + uses: actions/configure-pages@v3 + - name: Install Node.js dependencies + run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" + - name: Build with Hugo + env: + # For maximum backward compatibility with Hugo modules + HUGO_ENVIRONMENT: production + HUGO_ENV: production + run: | + hugo \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + 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@v2 diff --git a/config.toml b/config.toml index 7dd3b9def..395fc60e3 100644 --- a/config.toml +++ b/config.toml @@ -20,10 +20,10 @@ dateFormat = "2006-01-02" # website title for Open Graph and Twitter Cards # 网站标题, 用于 Open Graph 和 Twitter Cards - title = "My cool site" + title = "The Packet" # website description for RSS, SEO, Open Graph and Twitter Cards # 网站描述, 用于 RSS, SEO, Open Graph 和 Twitter Cards - description = "This is my cool site" + description = "The Packet" # website images for Open Graph and Twitter Cards # 网站图片, 用于 Open Graph 和 Twitter Cards images = [] @@ -45,7 +45,7 @@ logo = "" # title name # 标题名称 - name = "My cool site" + name = "The Packet" # you can add extra information before the name (HTML format is supported), such as icons # 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标 pre = "" @@ -113,13 +113,13 @@ [params.app] # optional site title override for the app when added to an iOS home screen or Android launcher # 当添加到 iOS 主屏幕或者 Android 启动器时的标题, 覆盖默认标题 - title = "My cool site" + title = "The Packet" # whether to omit favicon resource links # 是否隐藏网站图标资源链接 noFavicon = false # modern SVG favicon to use in place of older style .png and .ico files # 更现代的 SVG 网站图标, 可替代旧的 .png 和 .ico 文件 - svgFavicon = "" + svgFavicon = "ThePacket.png" # Android browser theme color # Android 浏览器主题色 themeColor = "#ffffff" @@ -181,7 +181,7 @@ title = "" # subtitle shown in home page (HTML format is supported) # 主页显示的网站副标题 (允许 HTML 格式) - subtitle = "This is my cool site" + subtitle = "The Packet" # whether to use typeit animation for subtitle # 是否为副标题显示打字机动画 typeit = true diff --git a/exampleSite/static/ThePacket.png b/exampleSite/static/ThePacket.png new file mode 100644 index 000000000..a369110b3 Binary files /dev/null and b/exampleSite/static/ThePacket.png differ