Skip to content

Commit

Permalink
feat: add docs website
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidapaulopt committed Nov 2, 2024
1 parent 3d584ba commit a1610e6
Show file tree
Hide file tree
Showing 9 changed files with 268 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.132.2
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history for .GitInfo and .Lastmod
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Setup Hugo
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc --minify \
--source=docs \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/public

# Deployment job
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@v4
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ dist/
dev/data/
dev/KEY_FILE
dev/tsauthkey.env


# Hugo output
docs/public/
docs/resources/
docs/.hugo_build.lock
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ docker_image_stop:
docker compose -f dev/docker-compose.yaml down


## docs local server
.PHONY: docs
docs:
cd docs && hugo server --buildDrafts --disableFastRender

# ==================================================================================== #
# QUALITY CONTROL
Expand Down
55 changes: 55 additions & 0 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: TSDPRoxy
layout: hextra-home
---
{{< hextra/hero-badge >}}
<div class="hx-w-2 hx-h-2 hx-rounded-full hx-bg-primary-400"></div>
<span>Free, open source</span>
{{< icon name="arrow-circle-right" attributes="height=14" >}}
{{< /hextra/hero-badge >}}

<div class="hx-mt-6 hx-mb-6">
{{< hextra/hero-headline >}}
Very simple proxy&nbsp;<br class="sm:hx-block hx-hidden" />with Tailscale and Docker
{{< /hextra/hero-headline >}}
</div>

<div class="hx-mb-12">
{{< hextra/hero-subtitle >}}
Fast, simple and easy&nbsp;<br class="sm:hx-block hx-hidden" />for virtual services in Tailscale
{{< /hextra/hero-subtitle >}}
</div>

<div class="hx-mb-6">
{{< hextra/hero-button text="Get Started" link="docs" >}}
</div>

<div class="hx-mt-6"></div>

{{< hextra/feature-grid >}}
{{< hextra/feature-card
title="Easy to Use"
subtitle="Proxies traffic to virtual Tailscale addresses using Docker container labels"
>}}
{{< hextra/feature-card
title="Lightweight as a Feather"
subtitle="No need to spin up a dedicated Tailscale container for every service."
>}}
{{< hextra/feature-card
title="Work saver"
subtitle="No need to configure virtual hosts in Tailscale network."
>}}
{{< hextra/feature-card
title="Automatically supports TLS"
subtitle="Automatically supports Tailscale/LetsEncrypt certificates with MagicDNS."
>}}
{{< hextra/feature-card
title="Free"
subtitle="TSDPRoxy is free, open source and always will be."
>}}
{{< hextra/feature-card
title="And More..."
icon="sparkles"
subtitle="More features are coming."
>}}
{{< /hextra/feature-grid >}}
5 changes: 5 additions & 0 deletions docs/content/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: About
type: about
---
TSDProxy is a Docker-based application that automatically creates a proxy to virtual addresses in your Tailscale network based on Docker container labels. It simplifies traffic redirection to services running inside Docker containers, without the need for a separate Tailscale container for each service.
5 changes: 5 additions & 0 deletions docs/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/imfing/hextra-starter-template

go 1.21

require github.com/imfing/hextra v0.8.6 // indirect
2 changes: 2 additions & 0 deletions docs/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/imfing/hextra v0.8.6 h1:fpOqzcUs26Lc/ZzowYSBcnpe00d/aZw4HhiHP7ycSks=
github.com/imfing/hextra v0.8.6/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI=
101 changes: 101 additions & 0 deletions docs/hugo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Hugo configuration file
title: TSDProxy

enableRobotsTXT: true
enableGitInfo: true
enableEmoji: true

defaultContentLanguage: en
languages:
en:
languageName: English
weight: 1

# import hextra as module
module:
imports:
- path: github.com/imfing/hextra

markup:
# allow raw html
goldmark:
renderer:
unsafe: true

# enable hextra syntax highlight
highlight:
noClasses: false

enableInlineShortcodes: true

menu:
main:
- name: Docs
pageRef: /docs
weight: 1
- name: About
pageRef: /about
weight: 2
- name: Search
weight: 4
params:
type: search
- name: GitHub
weight: 5
url: "https://github.com/almeidapaulopt/tsdproxy"
params:
icon: github
- name: Twitter
weight: 6
url: "https://twitter.com/almeidapaulopt"
params:
icon: x-twitter

sidebar:
- params:
type: separator
weight: 1
- name: "About"
pageRef: "/about"
weight: 2

params:
description: TSDProxy is a proxy for tailscale
navbar:
displayTitle: true
displayLogo: false
width: wide

page:
# full (100%), wide (90rem), normal (1280px)
width: normal

footer:
enable: true
displayCopyright: true
displayPoweredBy: false
width: normal

displayUpdatedDate: true
dateFormat: "January 2, 2006"

editURL:
enable: true
base: "https://github.com//almeidapaulopt/tsdproxy-docs/edit/main/content"

# Search
search:
enable: true
type: flexsearch

flexsearch:
# index page by: content | summary | heading | title
index: content

tokenize: full

highlight:
copy:
enable: true
# hover | always
display: hover
13 changes: 13 additions & 0 deletions docs/i18n/en.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
backToTop: "Scroll to top"
changeLanguage: "Change language"
changeTheme: "Change theme"
copyCode: "Copy code"
copyright: "© 2024 almeidapaulopt"
dark: "Dark"
editThisPage: "Edit this page on GitHub →"
lastUpdated: "Last updated on"
light: "Light"
noResultsFound: "No results found."
onThisPage: "On this page"
readMore: "Read more →"
searchPlaceholder: "Search..."

0 comments on commit a1610e6

Please sign in to comment.