Code Monkey home page Code Monkey logo

thecodeofdaniel.github.io's Introduction

Download Congo Theme

  • Make sure golang is installed

    go version
  • Initialize your project and theme with...

    # If you're managing your project on GitHub
    hugo mod init github.com/<username>/<repo-name>
    
    # If you're managing your project locally
    hugo mod init my-project
  • Declare theme in config/_default/module.toml

    [[imports]]
    path = "github.com/jpanther/congo/v2"
    • Update the theme

      hugo mod get -u
    • You may need to run this to clear local cache

      hugo mod clean
      
  • Copy and paste the theme config files here except for module.toml

    config/_default/
    ├─ config.toml
    ├─ markup.toml
    ├─ menus.toml
    ├─ module.toml  # if you installed using Hugo Modules
    └─ params.toml

Deploy Using GitHub Pages

  • Create this file in github/workflows/gh-pages.yml

    # .github/workflows/gh-pages.yml
    
    name: GitHub Pages
    
    on:
      push:
        branches:
          - main
    
    jobs:
      build-deploy:
        runs-on: ubuntu-latest
        concurrency:
          group: ${{ github.workflow }}-${{ github.ref }}
        steps:
          - name: Checkout
            uses: actions/checkout@v3
            with:
              submodules: true
              fetch-depth: 0
    
          - 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_branch: gh-pages
              publish_dir: ./public

Other Requirements

  • Make sure base URL follows the one on github in hugo.toml

  • Change version of golang to go from x.x.x to x.x

  • Change workflow permissions (Settings > Actions > General > Workflow Permissions)

    • Select Read and write permissions
    • Check Allow GitHub Actions to create and approve pull requests
  • Change branches (Settings > Pages > Build and deployment)

    • Select Deploy from branch
    • Select the main branch
      • It WILL FAIL the first time. However, this will create a branch named gh-pages
    • Switch from main to gh-pages branch (It should be successful)

thecodeofdaniel.github.io's People

Contributors

thecodeofdaniel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.