Skip to content

Commit 7fb64d3

Browse files
committed
initial commit
0 parents  commit 7fb64d3

File tree

9 files changed

+139
-0
lines changed

9 files changed

+139
-0
lines changed

.github/workflows/deploy.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
if: github.event.repository.fork == false
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Install python3
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: 3.x
18+
- name: Cache
19+
uses: actions/cache@v3
20+
with:
21+
key: ${{ github.ref }}
22+
path: .cache
23+
- name: Install Material for MkDocs
24+
run: pip install mkdocs-material
25+
- name: Build
26+
run: mkdocs build --clean --config-file mkdocs.yaml -d site -v
27+
- name: Prepare message
28+
run: |
29+
MKDOCS_VERSION=$(pip list --no-index --format=json | jq -r '.[] | select(.name=="mkdocs").version')
30+
MATERIAL_VERSION=$(pip list --no-index --format=json | jq -r '.[] | select(.name=="mkdocs-material").version')
31+
SHA_SHORT=$(git rev-parse --short HEAD)
32+
MESSAGE="Deployed ${SHA_SHORT} with MkDocs version ${MKDOCS_VERSION} (${MATERIAL_VERSION})"
33+
echo "MESSAGE=${MESSAGE}" >> $GITHUB_ENV
34+
- name: Deploy
35+
uses: cpina/github-action-push-to-another-repository@main
36+
env:
37+
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
38+
with:
39+
source-directory: site/
40+
destination-github-username: "golang-jwt"
41+
destination-repository-name: "jwt"
42+
commit-message: ${{ env.MESSAGE }}
43+
target-branch: gh-pages

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.build/
2+
.idea/
3+
.vscode/

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"printWidth": 100,
5+
"singleQuote": false,
6+
"trailingComma": "none",
7+
"proseWrap": "always"
8+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 golang-jwt
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
DOCKER ?= docker
2+
# The official docker image is linux/amd64 only. So we use the recommended
3+
# third-party image as suggested in the docs:
4+
# https://squidfunk.github.io/mkdocs-material/getting-started/?h=docker#with-docker
5+
DOCKER_IMAGE ?= ghcr.io/afritzler/mkdocs-material
6+
DOCKER_BUILD_EXTRA_ARGS ?=
7+
8+
preview:
9+
$(DOCKER) run --rm -it -p 8000:8000 -v ${PWD}:/docs $(DOCKER_IMAGE) serve --dev-addr=0.0.0.0:8000

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# jwt-docs
2+
3+
Repository contains documentation for the [golang-jwt/jwt](https://github.com/golang-jwt/jwt)
4+
package.
5+
6+
## Tools
7+
8+
The documentation is built with [MkDocs](https://www.mkdocs.org/) and the
9+
[Material for MkDocs](https://squidfunk.github.io/mkdocs-material) theme.
10+
11+
We use a pre-built
12+
[docker image](https://squidfunk.github.io/mkdocs-material/getting-started/#with-docker) which comes
13+
with all dependencies pre-installed.
14+
15+
Note, we're using the recommended third-party image because the official one only supports
16+
`linux/amd64`.
17+
18+
```
19+
docker pull ghcr.io/afritzler/mkdocs-material
20+
```
21+
22+
Ensure you have Docker installed, run `make preview`, and open http://127.0.0.1:8000 to see a
23+
preview of the site locally.

docs/assets/jwt.png

31.3 KB
Loading

docs/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: Getting started with golang-jwt/jwt
3+
---
4+
5+
# Getting started
6+
7+
⚠️ This webpage is a work in progress.
8+
9+
## Installation
10+
11+
## Signing Algorithms

mkdocs.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
site_name: golang-jwt docs
2+
site_url: https://golang-jwt.github.io/jwt/
3+
4+
repo_name: golang-jwt/jwt
5+
repo_url: https://github.com/golang-jwt/jwt
6+
edit_uri: ""
7+
8+
theme:
9+
name: material
10+
palette:
11+
primary: white
12+
accent: indigo
13+
logo: assets/jwt.png
14+
favicon: assets/jwt.png
15+
features:
16+
- navigation.instant
17+
- toc.integrate
18+
- navigation.sections
19+
20+
nav:
21+
- index.md

0 commit comments

Comments
 (0)