Skip to content

polarispw/polarispw.github.io

Repository files navigation

Screenshot

The Hugo Portfolio Template empowers you to easily create a portfolio website. Make it your own by choosing a color theme and grid layout!

Trusted by 250,000+ researchers, educators, and students. Highly customizable via the integrated no-code, widget-based Wowchemy page builder, making every site truly personalized ⭐⭐⭐⭐⭐

Get Started Discord
Twitter Follow

Check out the latest demo of what you'll get in less than 10 minutes, or view the showcase.

The integrated Wowchemy website builder and CMS makes it easy to create a beautiful website for free. Edit your site in the CMS (or your favorite editor), generate it with Hugo, and deploy with GitHub or Netlify. Customize anything on your site with widgets, light/dark themes, and language packs.

We ask you, humbly, to support this open source movement

Today we ask you to defend the open source independence of the Wowchemy website builder and themes 🐧

We're an open source movement that depends on your support to stay online and thriving, but 99.9% of our creators don't give; they simply look the other way.

❤️ Click here to become a GitHub Sponsor, unlocking awesome perks such as exclusive academic templates and widgets

配置方法(Win)

配置Go环境

配置Hugo

  • 下载extended版本的Hugo
  • 将解压得到的exe文件放到./hugo/bin中,并加入到环境变量,使用hugo version查看版本

创建项目

  • 克隆喜欢的hugo项目模板
  • 在本地项目根目录下直接使用hugo server -D即可预览效果

部署网页

  • 新建.github/workflows/gh-pages.yml,内容如下
name: github pages
 
on:
  push:
    branches:
      - main  # Set a branch that will trigger a deployment
  pull_request:
 
jobs:
  deploy:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true  # Fetch Hugo themes (true OR recursive)
          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod
 
      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: 'latest'
          # extended: true
 
      - name: Build
        run: hugo --minify
 
      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        if: github.ref == 'refs/heads/main'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./public
  • 根据仓库名修改config.yaml中的baseURL: 'https://polarispw.github.io/' # Website URL
  • 执行如下指令

hugo                      // 发布网站到public目录中,Hugo建站的时候会读取public目录中的内容
git add .                 // 将所有内容添加到本地git仓库中
git commit -m "site init" // 提交信息
// 创建gh-pages分支
// GitHub Actions会从main分支获取内容执行一些操作,生成的内容会推送到gh-pages分支
git checkout --orphan gh-pages
git push -u origin main   // 将本地网站推送至远程库
  • 进入仓库设置,Pages/Build and deployment | Source: Deploy from a branch | Branch: gh-pages

About

Here is my personal website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published