Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
bschaatsbergen committed Feb 26, 2024
1 parent 7ee5dbf commit 2ce1a25
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 374 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install MkDocs and Material for MkDocs
run: pip install mkdocs[i18n] mkdocs-material mkdocs-awesome-pages-plugin
- name: Setup caching
uses: actions/cache@v3
with:
key: ${{ github.sha }}
path: .cache
- name: Build site
run: mkdocs build --config-file ./mkdocs.yml --site-dir ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

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@v2
373 changes: 0 additions & 373 deletions LICENSE

This file was deleted.

4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.PHONY: dev

dev:
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
# docs
# tfversion/docs

<img src="https://storage.googleapis.com/gopherizeme.appspot.com/gophers/cd3d0af2ddb25c058f511d6927b3ef701c30a493.png" width="125" height="125"> [![mkdocs-material](https://img.shields.io/badge/mkdocs--material-gray?logo=materialformkdocs)](https://tfversion.xyz)

Repository that hosts [docs](https://tfversion.xyz) for [tfversion](https://github.com/tfversion/tfversion).

## Development

Make sure you have Docker installed and then run `make dev` to get a live-reloading environment for writing documentation.
All documentation is written using Markdown and turned into static pages using [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/).

## Deployment

This project is deployed to GitHub pages via GitHub Actions.
This happens automatically when merging to the `main` branch.
Binary file added docs/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Home
---

Hello!
7 changes: 7 additions & 0 deletions docs/js/replace_links.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var links = document.links;

for (var i = 0, linksLength = links.length; i < linksLength; i++) {
if (links[i].hostname != window.location.hostname) {
links[i].target = '_blank';
}
}
5 changes: 5 additions & 0 deletions docs/packages/number/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Number
---

Hello Random Number!
59 changes: 59 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
site_name: 'tfversion'
site_description: 'Documentation for tfversion'
site_author: 'tfversion'
site_url: 'https://tfversion.xyz'
copyright: 'Copyright &copy; 2024 tfversion'
index_page: index.md

repo_name: tfversion/docs
repo_url: https://github.com/tfversion/docs
edit_uri: https://github.com/tfversion/docs/edit/main/docs

use_directory_urls: false

nav:
- Home: index.md
- Packages:
- Number: packages/number/index.md

theme:
name: material
logo: images/logo.png
favicon: images/favicon.png
palette:
scheme: hashicorp
primary: white
accent: blue
icon:
repo: fontawesome/brands/github
font: false
features:
- navigation.instant
- navigation.tracking
- navigation.sections
- navigation.expand
- navigation.footer
- navigation.tabs
- navigation.prune
- content.tabs.link
- content.action.edit

markdown_extensions:
- admonition
- pymdownx.highlight
- pymdownx.superfences
- md_in_html
- attr_list
- toc:
permalink: true

plugins:
- search

extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/tfversion

extra_javascript:
- js/replace_links.js

0 comments on commit 2ce1a25

Please sign in to comment.