Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hugo to Main Branch #2

Merged
merged 19 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
78 changes: 78 additions & 0 deletions .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# 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:
- hugo

# 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
pages: write
id-token: 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:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.128.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
TZ: America/Los_Angeles
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- 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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
.DS_Store
Thumbs.db
2 changes: 2 additions & 0 deletions R/build.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# An optional custom script to run before Hugo builds your site.
# You can delete it if you do not need it.
2 changes: 2 additions & 0 deletions R/build2.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# An optional custom script to run after Hugo builds your site.
# You can delete it if you do not need it.
18 changes: 18 additions & 0 deletions R/build_one.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
local({
# fall back on "/" if baseurl is not specified
baseurl = blogdown:::get_config2("baseurl", default = "/")
knitr::opts_knit$set(base.url = baseurl)
knitr::render_jekyll() # set output hooks

# input/output filenames as two arguments to Rscript
a = commandArgs(TRUE)
d = gsub("^_|[.][a-zA-Z]+$", "", a[1])
knitr::opts_chunk$set(
fig.path = sprintf("figure/%s/", d),
cache.path = sprintf("cache/%s/", d)
)
knitr::knit(
a[1], a[2], quiet = TRUE, encoding = "UTF-8",
envir = globalenv()
)
})
5 changes: 5 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---
181 changes: 181 additions & 0 deletions assets/css/dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
body {
color: white;
background-color: #202124;
margin: 0;
padding: 0;
position: relative;
}

::-moz-selection {
background: blue;
color: #fff;
text-shadow: none;
}

::selection {
background: red;
color: #fff;
text-shadow: none;
}

hr {
border-top: 3px dotted blue;
}
code {
background-color: lightblue;
color: black;
text-decoration: bold;
padding: 0.1em 0.2em;
}
pre {
background-color: #272822;
line-height: 1.4;
overflow-x: auto;
padding: 1em;
}

blockquote {
border-color: red;
background-color: #FCF5E5;
color: black;
min-height: 40px;
padding-left: 48px;
padding-block-start: 1px;
padding-block-end: 1px;
font-family: 'Fira Sans', sans-serif;
font-size: 18px;
font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
color: #ddd;
}
h1::before {
color: var(--darkMaincolor);
content: "# ";
}
h2::before {
color: var(--darkMaincolor);
content: "## ";
}
h3::before {
color: var(--darkMaincolor);
content: "### ";
}
h4::before {
color: var(--darkMaincolor);
content: "#### ";
}
h5::before {
color: var(--darkMaincolor);
content: "##### ";
}
h6::before {
color: var(--darkMaincolor);
content: "###### ";
}

a {
border-bottom: 3px solid var(--darkMaincolor);
color: inherit;
}
a:hover {
background-color: var(--darkMaincolor);
color: black;
}

ul {
border-color: red;
}

.site-description a {
color: #ddd;
}
.site-description a:hover {
color: black;
}

.tags a {
border-bottom: 3px solid var(--darkMaincolor);
}
.tags a:hover {
background-color: var(--darkMaincolor);
color: black;
}

.site-title a {
color: white;
text-decoration: none !important;
}

.site-toc a {
colour: purple;

}

.header nav,
.footer {
border-color: #333;
}

.highlight {
background-color: #333;
}
.soc:hover {
color: black;
}
.draft-label {
color: var(--darkMaincolor);
background-color: blue;
}
.highlight pre code[class=language-javaScript]::before,
.highlight pre code[class="language-js"]::before {
content: "js";
background: #f7df1e;
color: black;
}
.highlight pre code[class*='language-yml']::before,
.highlight pre code[class*='language-yaml']::before {
content: 'yaml';
background: #f71e6a;
color: white;
}
.highlight pre code[class*='language-shell']::before,
.highlight pre code[class*='language-bash']::before,
.highlight pre code[class*='language-sh']::before {
content: 'shell';
background: green;
color:white
}
.highlight pre code[class*='language-json']::before{
content: 'json';
background: dodgerblue;
color: #000000
}
.highlight pre code[class*='language-python']::before,
.highlight pre code[class*='language-py']::before {
content: 'py';
background: blue;
color: yellow ;
}
.highlight pre code[class*='language-css']::before{
content: 'css';
background: cyan;
color: black ;
}
.highlight pre code[class*='language-go']::before{
content: 'Go';
background: cyan;
color: royalblue ;
}
.highlight pre code[class*='language-md']::before,
.highlight pre code[class*='language-md']::before{
content: 'Markdown';
background: royalblue;
color: whitesmoke ;
}
45 changes: 45 additions & 0 deletions assets/css/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* fira-sans-regular - latin */
@font-face {
font-display: swap;
font-family: 'Fira Sans';
font-style: normal;
font-weight: 400;
src: url('../fonts/fira-sans-v10-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Fira Sans Regular'), local('FiraSans-Regular'),
url('../fonts/fira-sans-v10-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/fira-sans-v10-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/fira-sans-v10-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/fira-sans-v10-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/fira-sans-v10-latin-regular.svg#FiraSans') format('svg'); /* Legacy iOS */
}
/* roboto-mono-regular - latin */
@font-face {
font-display: swap;
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 400;
src: url('../fonts/roboto-mono-v12-latin-regular.eot'); /* IE9 Compat Modes */
src: url('../fonts/roboto-mono-v12-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/roboto-mono-v12-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/roboto-mono-v12-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/roboto-mono-v12-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/roboto-mono-v12-latin-regular.svg#RobotoMono') format('svg'); /* Legacy iOS */
}
/* ibm-plex-mono-500italic - latin */
@font-face {
font-display: swap;
font-family: 'IBM Plex Mono';
font-style: italic;
font-weight: 500;
src: url('../fonts/ibm-plex-mono-v6-latin-500italic.eot'); /* IE9 Compat Modes */
src: local('IBM Plex Mono Medium Italic'), local('IBMPlexMono-MediumItalic'),
url('../fonts/ibm-plex-mono-v6-latin-500italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/ibm-plex-mono-v6-latin-500italic.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/ibm-plex-mono-v6-latin-500italic.woff') format('woff'), /* Modern Browsers */
url('../fonts/ibm-plex-mono-v6-latin-500italic.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/ibm-plex-mono-v6-latin-500italic.svg#IBMPlexMono') format('svg'); /* Legacy iOS */
}

@page {
size: auto;
}
Loading