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

mkdocs setup #19

Merged
merged 1 commit into from
Oct 18, 2023
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
# vendor/

/.idea/
.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Empty file added docs/architecture.md
Empty file.
2 changes: 2 additions & 0 deletions docs/blog/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Development log

7 changes: 7 additions & 0 deletions docs/blog/posts/first-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
date: 2023-10-17
categories:
- init
---

# First post
Empty file added docs/concepts.md
Empty file.
Empty file added docs/configuration.md
Empty file.
Empty file added docs/dependencies.md
Empty file.
45 changes: 45 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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
```
5 changes: 5 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Installation instructions

## Using homebrew

## Using pip
Empty file added docs/single_node.md
Empty file.
Empty file added docs/troubleshooting.md
Empty file.
63 changes: 63 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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