From 9566ecc32353fa0290baae90e385a9ea2a0929e5 Mon Sep 17 00:00:00 2001 From: rajatgoel <405844+rajatgoel@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:39:33 -0700 Subject: [PATCH] mkdocs setup --- .github/workflows/mkdocs.yml | 24 +++++++++++++ .gitignore | 1 + README.md | 2 +- docs/architecture.md | 0 docs/blog/index.md | 2 ++ docs/blog/posts/first-post.md | 7 ++++ docs/concepts.md | 0 docs/configuration.md | 0 docs/dependencies.md | 0 docs/index.md | 45 +++++++++++++++++++++++++ docs/installation.md | 5 +++ docs/single_node.md | 0 docs/troubleshooting.md | 0 mkdocs.yml | 63 +++++++++++++++++++++++++++++++++++ 14 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/mkdocs.yml create mode 100644 docs/architecture.md create mode 100644 docs/blog/index.md create mode 100644 docs/blog/posts/first-post.md create mode 100644 docs/concepts.md create mode 100644 docs/configuration.md create mode 100644 docs/dependencies.md create mode 100644 docs/index.md create mode 100644 docs/installation.md create mode 100644 docs/single_node.md create mode 100644 docs/troubleshooting.md create mode 100644 mkdocs.yml diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml new file mode 100644 index 0000000..c26e16b --- /dev/null +++ b/.github/workflows/mkdocs.yml @@ -0,0 +1,24 @@ +name: mkdocs +on: + push: + branches: + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v3 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force diff --git a/.gitignore b/.gitignore index e99c171..eb2000c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ # vendor/ /.idea/ +.DS_Store diff --git a/README.md b/README.md index 1243fe6..900c161 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# gh-go [![GoDoc](https://godoc.org/github.com/rajatgoel/gh-go?status.svg)](https://godoc.org/github.com/rajatgoel/gh-go) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/build/badge.svg)](https://github.com/rajatgoel/gh-go/actions) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/lint/badge.svg)](https://github.com/rajatgoel/gh-go/actions) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/vuln/badge.svg)](https://github.com/rajatgoel/gh-go/actions) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/proto/badge.svg)](https://github.com/rajatgoel/gh-go/actions) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/sqlc/badge.svg)](https://github.com/rajatgoel/gh-go/actions) +# gh-go [![GoDoc](https://godoc.org/github.com/rajatgoel/gh-go?status.svg)](https://godoc.org/github.com/rajatgoel/gh-go) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/build/badge.svg)](https://github.com/rajatgoel/gh-go/actions) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/lint/badge.svg)](https://github.com/rajatgoel/gh-go/actions) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/vuln/badge.svg)](https://github.com/rajatgoel/gh-go/actions) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/proto/badge.svg)](https://github.com/rajatgoel/gh-go/actions) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/sqlc/badge.svg)](https://github.com/rajatgoel/gh-go/actions) [![Actions Status](https://github.com/rajatgoel/gh-go/workflows/mkdocs/badge.svg)](https://github.com/rajatgoel/gh-go/actions) GitHub workflow's for Go diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/blog/index.md b/docs/blog/index.md new file mode 100644 index 0000000..85628c3 --- /dev/null +++ b/docs/blog/index.md @@ -0,0 +1,2 @@ +# Development log + diff --git a/docs/blog/posts/first-post.md b/docs/blog/posts/first-post.md new file mode 100644 index 0000000..6defe10 --- /dev/null +++ b/docs/blog/posts/first-post.md @@ -0,0 +1,7 @@ +--- +date: 2023-10-17 +categories: +- init +--- + +# First post diff --git a/docs/concepts.md b/docs/concepts.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/dependencies.md b/docs/dependencies.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..c6fc717 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,45 @@ +--- +hide: + - navigation + - toc +--- + +# gh-go + +A Github template to kick start a new Go module. + +## Integrations + +- [x] [buf](https://buf.build/) + * [ ] Check if protobuf code needs to be generated before check-in. +- [x] [sqlc](https://sqlc.dev/) for SQL backend. +- [x] [golangci-lint](https://golangci-lint.run/) for linters. +- [ ] [goreleaser](https://goreleaser.com/) for releases. + +## Project layout + +```yaml + # mkdocs + mkdocs.yml # The configuration file. + docs/ + blog/ # Development log + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. + + # Go + cmd/ # Binaries + frontend/ + tools/ + ... + internal/ + frontend/ # Internal libraries + ... + itest/ # Integration tests + ... + + # Protobuf + proto/ + gen/ + + justfile # Helper commands +``` diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000..421e554 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,5 @@ +# Installation instructions + +## Using homebrew + +## Using pip diff --git a/docs/single_node.md b/docs/single_node.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md new file mode 100644 index 0000000..e69de29 diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..691545b --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,63 @@ +site_name: GH-Go + +repo_name: rajatgoel/gh-go +repo_url: https://github.com/rajatgoel/gh-go +edit_uri: edit/main/docs/ + +theme: + name: material + features: + - content.action.edit + - content.action.view + - content.code.annotate + - content.code.copy + - navigation.expand + - navigation.footer + - navigation.indexes + - navigation.instant + - navigation.tabs + - toc.follow + + palette: + - scheme: default + toggle: + icon: material/toggle-switch + name: Switch to dark mode + + # Palette toggle for dark mode + - scheme: slate + toggle: + icon: material/toggle-switch-off-outline + name: Switch to light mode + +plugins: + - blog + - search + +markdown_extensions: + - def_list + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences + +nav: + - Home: index.md + - Getting started: + - Installation: installation.md + - Running: + - Single node: single_node.md + - Troubleshooting: troubleshooting.md + - Architecture: + - architecture.md + - Core concepts: concepts.md + - Dependencies: dependencies.md + - Developers: + - Configuration: configuration.md + - Development log: + - blog/index.md