Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
monotykamary committed Oct 16, 2023
0 parents commit 03bc32c
Show file tree
Hide file tree
Showing 35 changed files with 1,109 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy Hugo from Obsidian notes

on:
push:
branches:
- main
workflow_dispatch:

jobs:
publish_job:
runs-on: ubuntu-latest
name: Publish Obsidian notes to Github pages
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.DWARVES_PAT }}

- name: Checkout contents repo
uses: actions/checkout@v4
with:
token: ${{ secrets.DWARVES_PAT }}
repository: dwarvesf/content
path: vault

- name: Cache cargo plugins
id: cache-obsidian-export
uses: actions/cache@v1
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-plugins

- name: Install obsidian-export
if: steps.cache-obsidian-export.outputs.cache-hit != 'true'
uses: actions-rs/install@v0.1
with:
crate: obsidian-export
version: latest

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true

- name: Create content dir if not exists
shell: bash
run: mkdir -p ./content

- name: Export Vault
shell: bash
run: obsidian-export ./vault ./content

- name: Build Hugo
shell: bash
run: hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work

# hugo dev-related files
resources
.hugo_build.lock
vault/
public/*
!public/CNAME
content/
133 changes: 133 additions & 0 deletions LICENSE.by-nc-sa-4.0.md

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
setup:
@brew install rust
@brew install hugo
@cargo install obsidian-export
@if [ ! -d "./vault" ]; then git clone git@github.com:dwarvesf/content.git vault; \
else pushd vault && git pull && popd; fi
@mkdir -p ./content

build:
@cd vault && git pull
@obsidian-export ./vault ./content
@hugo --minify

run:
hugo server

build-target:
@mkdir -p vault content
@rsync -avh $(path) ./vault/ --delete
@obsidian-export ./vault/ ./content/
@hugo --minify

run-target:
@mkdir -p vault content
@rsync -avh $(path) ./vault/ --delete
@obsidian-export ./vault/ ./content/
@hugo server
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# log.console.so

## Getting Started

This is our hugo repository for the log.console.so website. We use GitHub actions to automate the following:
1. Turn Obsidian markdown files into general markdown syntax

### Prerequisites
Binary file added assets/android-chrome-192x192.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 assets/android-chrome-512x512.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 assets/apple-touch-icon.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 assets/favicon-16x16.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 assets/favicon-32x32.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 assets/favicon.ico
Binary file not shown.
Binary file added assets/img/ConsoleLabs_logo+text_black.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 assets/img/ConsoleLabs_logo+text_white.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 assets/img/ConsoleLabs_logo.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 assets/img/ConsoleLabs_logo_1.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 assets/img/ConsoleLabs_logo_blackbg.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 assets/img/ConsoleLabs_logo_crop.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 assets/img/ConsoleLabs_logo_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 03bc32c

Please sign in to comment.