Skip to content

Instantly share code, notes, and snippets.

@gjbianco
Created February 12, 2021 20:22
Show Gist options
  • Save gjbianco/140857ad384e055259e5ce78d69a1bd2 to your computer and use it in GitHub Desktop.
Save gjbianco/140857ad384e055259e5ce78d69a1bd2 to your computer and use it in GitHub Desktop.
hugo + asciidoc + gh-page + gh-actions
name: hugo
on:
push:
branches:
- master # Set a branch to deploy
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
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: "0.79.1"
extended: true
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- run: gem install asciidoctor pygments.rb
- name: Run Hugo
run: |
alias asciidoctor="asciidoctor --attribute=experimental=true --attribute=icons=font"
hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
---
baseURL: https://example.com
title: $NAME
languageCode: en-us
defaultContentLanguage: en
theme: hugo-coder
paginate: 20
pygmentsStyle: monokai
pygmentsCodeFences: true
pygmentsCodeFencesGuessSyntax: true
params:
author: $NAME
info: a basic description
# description: $NAME's personal website
keywords: key,words,list
gravatar: $EMAIL
# avatarurl: images/avatar.jpg
colorscheme: dark
hidecolorschemetoggle: false
favicon_32: /img/favicon-32x32.png
favicon_16: /img/favicon-16x16.png
# footercontent: Enter a text here.
hideFooter: false
hideCredits: true
hideCopyright: false
since: 2016
# enableTwemoji: true
# customCSS: ["css/custom.css"]
# customSCSS: ["scss/custom.scss"]
# customJS: ["js/custom.js"]
social:
- name: GitHub
icon: fa fa-github fa-2x
weight: 1
url: https://github.com/$USERNAME/
- name: Twitter
icon: fa fa-twitter fa-2x
weight: 3
url: https://twitter.com/$USERNAME/
- name: LinkedIn
icon: fa fa-linkedin fa-2x
weight: 3
url: https://www.linkedin.com/in/$USERNAME/
taxonomies:
category: categories
series: series
author: authors
tag: tags
# Menu links
menu:
main:
- name: Blog
weight: 1
url : posts/
- name: Projects
weight: 2
url : projects/
- name: Code
weight: 3
url: https://github.com/$USERNAME/
markup:
asciidocext:
# backend: html5
# workingfoldercurrent: false
# trace: true
# verbose: true
attributes:
source-highlighter: pygments
pygments-css: style
pygments-style: monokai
# includedir: include
# icons: font
# experimental: true
# sectlinks: false
# sectanchors: false
# source-highlighter: rouge
# rouge-css: style
# rouge-style: github
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment