generated from chrede88/qubtTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d8f1363
Showing
38 changed files
with
878 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: 🐛 Issues | ||
url: https://github.com/Chrede88/qubt/issues | ||
about: Please report issues in the theme repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# empty placeholder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base" | ||
], | ||
"dependencyDashboardTitle": "Renovate Dashboard 🤖", | ||
"commitMessagePrefix": "🤖", | ||
"reviewers": ["chrede88"], | ||
"timezone": "Europe/Zurich", | ||
"schedule": [ | ||
"after 6pm and before 6am every weekday", | ||
"every weekend" | ||
], | ||
"customManagers": [ | ||
{ | ||
"description": "Update Hugo/Go version in Github actions", | ||
"customType": "regex", | ||
"fileMatch": ["^.github/(?:workflows|actions)/.+\\.ya?ml$"], | ||
"matchStrings": ["datasource=(?<datasource>.*?) depName=(?<depName>.*?)\n.*?'(?<currentValue>.*)'\n"], | ||
"versioningTemplate": "semver-coerced", | ||
"extractVersionTemplate": "^(v|go)?(?<version>.*)$" | ||
} | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchManagers": ["gomod"], | ||
"matchDepTypes": ["indirect"], | ||
"enabled": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# %NAME% | ||
|
||
Please follow the instructions below to finish the setup of your new Qubt site. | ||
|
||
## Installation | ||
|
||
0) Add a LICENSE to your repo. | ||
1) Clone your version of the template to your local computer: | ||
```shell | ||
git clone https://github.com/%USER%/%NAME% | ||
``` | ||
2) Change the module name to match your github repo in `go.mod`. | ||
3) Modify `config/_default/hugo.yaml` and `config/_default/params.yaml` according to the Configuration below. | ||
4) In a terminal/commandline, move to the newly created folder using `cd`. | ||
5) Build a local version of your site by executing `hugo server`. You can see the site by navigating to `http://localhost:1313/%NAME%/` (actual URL will be outputted in the CLI) in a browser. | ||
6) Add a new image to the `assets/` folder, using the same name as you specified in `params.yaml`. | ||
7) Add a new `icon.png` file to update the favicon. The png file should be 512px by 512px in size. | ||
|
||
--- | ||
|
||
## Configuration | ||
|
||
All configuration is done in the four configuration files under `config/_default/`. The URL and site title can be set in `hugo.yaml`. The navbar settings are set in `menus.yaml`. All other parameters are set in `params.yaml`. | ||
|
||
`hugo.yaml`: | ||
```yaml | ||
baseURL: 'https://%USER%.github.io/%NAME%' | ||
title: 'Qubt Theme' | ||
``` | ||
`menus.yaml`: | ||
```yaml | ||
main: | ||
- name: Home | ||
url: / | ||
weight: 10 | ||
- name: Blog | ||
url: /blog/ | ||
weight: 20 | ||
- name: About | ||
url: /about/ | ||
weight: 30 | ||
``` | ||
|
||
`params.yaml`: | ||
```yaml | ||
############################ | ||
## Author | ||
############################ | ||
author: | ||
name: %USER% | ||
image: author.jpeg | ||
greeting: "A personal blog theme for Hugo :evergreen_tree:" | ||
icon: ":wave:" | ||
############################ | ||
## Links | ||
############################ | ||
links: | ||
- github: https://github.com/%USER%/%NAME% | ||
- link: https://github.com/%USER%/%NAME%#readme | ||
############################### | ||
## OpenGraph & Twitter Cards | ||
############################### | ||
title: %NAME% | ||
description: "Demo site build with Qubt & Hugo" | ||
images: | ||
- thumbnail.jpeg | ||
``` | ||
|
||
Links are defined by the name (i.e. "github" or "facebook"). The names must match one of the supported link icons, see list below. | ||
|
||
### Supported Social Icons | ||
| **Supported Icons** | **Supported Icons** | **Supported Icons** | **Supported Icons** | | ||
| --- | --- | --- | --- | | ||
| amazon | apple | bandcamp | bitbucket | | ||
| bluesky | check-mark | codepen | dev | | ||
| discord | dribbble | email | etsy | | ||
| facebook | flickr | foursquare | github | | ||
| gitlab | google | instagram | keybase | | ||
| kickstarter | link | linkedin | mastodon | | ||
| medium | orcid | patreon | paypal | pinterest | | ||
| reddit | signal | skype | slack | | ||
| snapchat | soundcloud | spotify | stack-exchange | | ||
| stack-overflow | strava | telegram | tiktok | | ||
| tumblr | twitch | untappd | website | | ||
| whatsapp | windows | x-twitter | youtube | | ||
|
||
|
||
### Custom Social Icons | ||
Users can provide their own icons by placing a `.svg` image in `./assets/icons/` in their own repo. Creating folders when necessary. The image should be as circular as possible for the best result. Don't use spaces in the filename! Find all current icons [here](https://github.com/chrede88/qubt/tree/main/assets/icons). | ||
|
||
--- | ||
|
||
## Update the Theme Version | ||
|
||
The theme version used to build the site is defined in `go.mod` file. | ||
|
||
The best practice is to update to released and tested versions. To update to a specific version execute the following command in a terminal/commandline (at the root path of your site repo): | ||
|
||
```shell | ||
hugo mod get github.com/Chrede88/[email protected] | ||
``` | ||
Replace X,Y & Z with the corresponding version numbers. You can find the releases [here](https://github.com/Chrede88/qubt/releases). Please check if any breaking changes are listed under the release you want to update to, before proceeding. | ||
|
||
--- | ||
|
||
## Deploy on Github Pages | ||
You can very easily deploy your site using Github Pages. Included in this template is a Github Action workflow that will build and deploy your site to Github Pages automatically:+1: | ||
|
||
You can find the workflow here `.github/deploymentWorkflow/buildDeploy.yml`. To use this, move it to `.github/workflows/`. | ||
|
||
The workflow is already set up and ready to go, but go through it and spend some time to understand what's going on. Otherwise, it'll always be this black box of magic that you can't fix when it breaks! | ||
|
||
Last step: Go to Settings -> Pages -> Build and deployment -> Set the Source to "Github Actions". | ||
|
||
Next time you publish a release this workflow will build and deploy your site :tada: | ||
|
||
Your site will be published to the following URL: | ||
`https://%USER%.github.io/%NAME%` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
############################ | ||
## CHANGE THESE | ||
############################ | ||
|
||
baseURL: 'https://%USER%.github.io/%NAME%' | ||
title: %NAME% | ||
|
||
############################ | ||
## MISC | ||
############################ | ||
|
||
enableEmoji: true | ||
disableKinds: ['taxonomy', 'term'] | ||
languageCode: 'en-us' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
############################ | ||
## Author | ||
############################ | ||
|
||
author: | ||
name: %USER% | ||
image: author.png | ||
greeting: "Your new Qubt site :tada:" | ||
icon: ":wave:" | ||
|
||
############################ | ||
## Links | ||
############################ | ||
|
||
links: | ||
- github: https://github.com/%USER%/%NAME% | ||
- link: https://github.com/%USER%/%NAME%#readme | ||
# - website: | ||
# - x-twitter: | ||
# - mastodon: | ||
# - linkedin: | ||
# - instagram: | ||
# - reddit: | ||
# - telegram: | ||
# - whatsapp: | ||
# - signal: | ||
# - codepen: | ||
# - dev: | ||
# - email: | ||
# - discord: | ||
# - orcid: | ||
# - slack: | ||
# - stack-overflow: | ||
# - twitch: | ||
# - patreon: | ||
# - soundcloud: | ||
# - dribbble: | ||
# - stack-exchange: | ||
# - tiktok: | ||
# - youtube: | ||
# - keybase: | ||
# - flickr: | ||
# - tumblr: | ||
# - kickstarter: | ||
# - snapchat: | ||
# - bluesky: | ||
# - bitbucket: | ||
# - bandcamp: | ||
# - etsy: | ||
# - spotify: | ||
# - pinterest: | ||
# - strava: | ||
# - untappd: | ||
# - skype: | ||
# - medium: | ||
# - foursquare: | ||
# - apple: | ||
# - amazon: | ||
# - google: | ||
# - paypal: | ||
# - windows: | ||
|
||
############################### | ||
## OpenGraph & Twitter Cards | ||
############################### | ||
|
||
title: %NAME% | ||
description: "Site build with Qubt & Hugo" | ||
images: | ||
- thumbnail.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# don't change | ||
type: misc | ||
|
||
# change these | ||
jobTitle: Blogger | ||
name: %USER% | ||
bio: true | ||
icon: ":coffee:" | ||
--- | ||
|
||
Add your Bio here!:+1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/%USER%/%NAME% | ||
|
||
go 1.22.2 | ||
|
||
require github.com/chrede88/qubt v1.3.1 // indirect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Sample workflow for building and deploying a Hugo site to GitHub Pages | ||
# Go to Settings -> Pages -> Build and deployment -> Set the Source to "Github Actions". | ||
name: Build & Deploy Hugo site to Pages | ||
|
||
# Will fire when a new release is published | ||
on: | ||
release: | ||
types: [published] | ||
|
||
# Change the above to this if you want to build and deploy on every push, but | ||
# be mindful of overuse. Free accounts have a limited amount of | ||
# compute time per month. | ||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
|
||
# 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 | ||
id-token: write | ||
pages: 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: # name of the job. We are conditioning the next job (deploy) on the succes of this one. | ||
runs-on: ubuntu-latest # runner | ||
steps: | ||
# Checkout the main branch so the action has access to the files | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
# Setup Go. Remember to keep the version up to date with your local build environment | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
# renovate: datasource=github-tags depName=golang/go | ||
go-version: '1.23.0' | ||
|
||
# Setup Hugo. Remember to keep the version up to date with your local build environment | ||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v3 | ||
with: | ||
# renovate: datasource=github-releases depName=gohugoio/hugo | ||
hugo-version: '0.132.1' | ||
extended: true | ||
|
||
# Build your site and dump the files in ./public | ||
- name: Build | ||
run: hugo --minify | ||
|
||
# Upload the files outputtet files so the next job can get to them | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./public | ||
|
||
# Deployment job. Now let's deploy the site | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} # https://<username>.github.io/<repo> | ||
runs-on: ubuntu-latest # runner | ||
needs: build # only do this if the build was succesfull | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
Oops, something went wrong.