Skip to content

Commit

Permalink
First setting up of a Hugo site for RAM resources (see #48)
Browse files Browse the repository at this point in the history
  • Loading branch information
kallewesterling committed Feb 27, 2024
1 parent 3833aeb commit 88eefd1
Show file tree
Hide file tree
Showing 109 changed files with 16,718 additions and 3 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
@@ -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: ["main"]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Environment variables available to all jobs and steps in this workflow
env:
HUGO_ENV: production
HUGO_VERSION: "0.121.2"
GO_VERSION: "1.20.5"
NODE_VERSION: "20.0.0"
TINA_CLIENT_ID: ${{ vars.TINA_CLIENT_ID }}
TINA_TOKEN: ${{ vars.TINA_TOKEN }}

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install Hugo
run: |
curl -LO "https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_Linux-64bit.tar.gz"
tar -xvf hugo_extended_${{ env.HUGO_VERSION }}_Linux-64bit.tar.gz
sudo mv hugo /usr/local/bin/
rm hugo_extended_${{ env.HUGO_VERSION }}_Linux-64bit.tar.gz
hugo version
- name: Install Go
run: |
curl -LO "https://dl.google.com/go/go${{ env.GO_VERSION }}.linux-amd64.tar.gz"
sudo tar -C /usr/local -xzf go${{ env.GO_VERSION }}.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> $GITHUB_ENV
rm go${{ env.GO_VERSION }}.linux-amd64.tar.gz
go version
- name: Setup Project
run: npm run project-setup

- name: Install npm dependencies
run: npm install

- name: Publish to GitHub Pages
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
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@v4
22 changes: 19 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,29 @@ venv.bak/
# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Hugo
Thumbs.db
.DS_Store
.dist
.tmp
.lock
.sass-cache
npm-debug.log
node_modules
builds
package-lock.json
public
resources
.hugo_build.lock
jsconfig.json
hugo_stats.json
go.sum
yarn.lock
13 changes: 13 additions & 0 deletions site/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"plugins": ["prettier-plugin-go-template"],
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "go-template",
"goTemplateBracketSpacing": true,
"bracketSameLine": true
}
}
]
}
21 changes: 21 additions & 0 deletions site/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2023 - Present, Zeon Studio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
33 changes: 33 additions & 0 deletions site/_unused/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Update the arg in docker-compose.yml or devcontainer.json to switch arg versions
ARG NODE_VERSION=18

# main image
FROM mcr.microsoft.com/devcontainers/javascript-node:${NODE_VERSION}

# Update the arg in docker-compose.yml or devcontainer.json to switch arg versions
ARG GO_VERSION=latest
ARG HUGO_VERSION=latest

# Download necessary tools
RUN apt-get update && apt-get install -y \
ca-certificates openssl git curl && \
rm -rf /var/lib/apt/lists/* && \
# set architecture
case $(uname -m) in \
aarch64) \
export ARCH=arm64 ;; \
*) \
export ARCH=amd64 ;; \
esac && \
# install Hugo
wget -O hugo_extended_${HUGO_VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${ARCH}.tar.gz && \
tar xf hugo_extended_${HUGO_VERSION}.tar.gz && \
mv hugo /usr/bin/hugo && \
rm hugo_extended_${HUGO_VERSION}.tar.gz && \
# install Go
wget -O go${GO_VERSION}.linux-${ARCH}.tar.gz https://dl.google.com/go/go${GO_VERSION}.linux-${ARCH}.tar.gz && \
tar -C /usr/local -xzf go${GO_VERSION}.linux-${ARCH}.tar.gz && \
rm go${GO_VERSION}.linux-${ARCH}.tar.gz

# Export Go path
ENV PATH=$PATH:/usr/local/go/bin
24 changes: 24 additions & 0 deletions site/_unused/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "Hugo",
"build": {
"dockerfile": "Dockerfile",
"args": {
"NODE_VERSION": "20",
"GO_VERSION": "1.21.4",
"HUGO_VERSION": "0.120.4"
}
},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"bradlc.vscode-tailwindcss",
"budparr.language-hugo-vscode",
"tamasfe.even-better-toml"
]
}
},
"remoteUser": "node",
"postCreateCommand": "npm install && npm run dev:example",
"forwardPorts": [1313]
}
29 changes: 29 additions & 0 deletions site/_unused/amplify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 1
frontend:
phases:
preBuild:
commands:
- yum install -y curl
- curl -LO "https://github.com/gohugoio/hugo/releases/download/v0.121.2/hugo_extended_0.121.2_Linux-64bit.tar.gz"
- tar -xvf hugo_extended_0.121.2_Linux-64bit.tar.gz
- mv hugo /usr/local/bin/
- rm hugo_extended_0.121.2_Linux-64bit.tar.gz
- echo "HUGO 0.121.2 INSTALLED"
- curl -LO "https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz"
- tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz
- export PATH=$PATH:/usr/local/go/bin
- rm go1.20.5.linux-amd64.tar.gz
- echo "GO 1.20.5 INSTALLED"
- npm install
build:
commands:
- npm run project-setup
- npm run build
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory: /public
files:
- "**/*"
cache:
paths:
- node_modules/**/*
7 changes: 7 additions & 0 deletions site/_unused/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build]
publish = "public"
command = "yarn project-setup; yarn build"

[build.environment]
HUGO_VERSION = "0.121.2"
GO_VERSION = "1.20.5"
43 changes: 43 additions & 0 deletions site/_unused/vercel-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# default versions
NODE_VERSION='18.16.1';
GO_VERSION='1.20.5';
HUGO_VERSION='0.121.2';

# install Node.js
# echo "Installing Node.js $NODE_VERSION..."
# curl -sSOL https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.gz
# tar -xzf node-v${NODE_VERSION}.tar.gz
# export PATH=$PATH:/usr/local/bin
# rm -rf node-v${NODE_VERSION}.tar.gz

echo "USING NODE VERSION: $(node -v)"

# install Go
echo "Installing Go $GO_VERSION..."
curl -sSOL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
rm -rf go${GO_VERSION}.linux-amd64.tar.gz
go version

# install Hugo
echo "Installing Hugo $HUGO_VERSION..."
curl -sSOL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
tar -xzf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
mv hugo /usr/local/bin/
rm -rf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
hugo version

# project setup
echo "Project setting up..."
npm run project-setup

# install dependencies
echo "Installing project dependencies..."
npm install

# run the build command
echo "Running the build command..."
npm run build
21 changes: 21 additions & 0 deletions site/_unused/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"builds": [
{
"src": "vercel-build.sh",
"use": "@vercel/static-build",
"config": {
"distDir": "public"
}
}
],
"routes": [
{
"handle": "filesystem"
},
{
"src": "/(.*)",
"status": 404,
"dest": "/404.html"
}
]
}
Binary file added site/assets/images/avatar-sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/call-to-action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/gallery/01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/gallery/02.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/gallery/03.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/gallery/04.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/gallery/05.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/gallery/06.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/image-placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/no-search-found.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/service-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/service-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/assets/images/service-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/assets/scss/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Add your own custom styles here
6 changes: 6 additions & 0 deletions site/config/_default/languages.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
################ English language ##################
[en]
languageName = "En"
languageCode = "en-us"
contentDir = "content/english"
weight = 1
59 changes: 59 additions & 0 deletions site/config/_default/menus.en.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
############# English navigation ##############

# main menu
[[main]]
name = "Home"
url = "/"
weight = 1

[[main]]
name = "About"
url = "about/"
weight = 2

[[main]]
name = "Team"
url = "authors/"
weight = 3

# [[main]]
# name = "Elements"
# url = "elements/"
# weight = 3

# [[main]]
# weight = 4
# name = "Pages"
# hasChildren = true

[[main]]
# parent = "Pages"
name = "Resources"
url = "blog/"

[[main]]
# parent = "Pages"
name = "Contact"
url = "contact/"

# [[main]]
# parent = "Pages"
# name = "Categories"
# url = "categories/"

# [[main]]
# parent = "Pages"
# name = "404 Page"
# url = "404/"


# footer menu
[[footer]]
name = "About"
url = "about/"
weight = 1

[[footer]]
name = "Privacy Policy"
url = "privacy-policy/"
weight = 2
Loading

0 comments on commit 88eefd1

Please sign in to comment.