Skip to content
Open
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
58 changes: 58 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Docs

on:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
pull_request:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
workflow_dispatch:

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

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install and build
run: make docs-build

- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OUTPUT ?= bin/$(BINARY)
GOPATH := $(shell go env GOPATH)
GORELEASER := $(GOPATH)/bin/goreleaser

.PHONY: build install release-build release-snapshot test fmt check hooks clean
.PHONY: build install release-build release-snapshot test fmt check hooks clean docs-install docs-dev docs-build docs-preview

build:
go build -ldflags "$(LDFLAGS)" -o bin/$(BINARY) .
Expand Down Expand Up @@ -57,3 +57,15 @@ hooks:

clean:
rm -rf bin/

docs-install:
cd docs && npm ci

docs-dev:
cd docs && npm run dev

docs-build:
cd docs && npm ci && npm run build

docs-preview:
cd docs && npm run preview
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ make build

## Usage

Documentation: run `make docs-dev` and open the local URL, or see the [docs site](https://robert27.github.io/eggl-cli/) after deployment.

```bash
eggl --help
eggl version
Expand Down
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.vitepress/cache
.vitepress/dist
81 changes: 81 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { defineConfig } from 'vitepress'

export default defineConfig({
title: 'eggl',
description: 'A general-purpose helper CLI for dev workflow, cloud, and everyday tasks.',
lang: 'en-US',
base: '/',
cleanUrls: true,
lastUpdated: true,
appearance: 'dark',
head: [
['link', { rel: 'icon', href: '/favicon.svg', type: 'image/svg+xml' }],
['meta', { name: 'theme-color', content: '#F97316' }],
['meta', { property: 'og:title', content: 'eggl — developer helper CLI' }],
['meta', { property: 'og:description', content: 'File hygiene, env switching, port-forwards, and more — one CLI for your daily workflow.' }],
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@300;400;500;600;700;800&display=swap' }],
],
themeConfig: {
logo: '/logo.svg',
siteTitle: 'eggl',
nav: [
{ text: 'Guide', link: '/guide/getting-started', activeMatch: '/guide/' },
{ text: 'Commands', link: '/commands/', activeMatch: '/commands/' },
{
text: 'GitHub',
link: 'https://github.com/Robert27/eggl-cli',
},
],
sidebar: {
'/guide/': [
{
text: 'Introduction',
items: [
{ text: 'Getting Started', link: '/guide/getting-started' },
{ text: 'Installation', link: '/guide/installation' },
{ text: 'Configuration', link: '/guide/configuration' },
{ text: 'Shell Completion', link: '/guide/completion' },
],
},
],
'/commands/': [
{
text: 'Overview',
items: [{ text: 'All Commands', link: '/commands/' }],
},
{
text: 'File & Git',
items: [
{ text: 'dedash', link: '/commands/dedash' },
{ text: 'eol', link: '/commands/eol' },
{ text: 'empty', link: '/commands/empty' },
],
},
{
text: 'Cloud & Dev',
items: [
{ text: 'env', link: '/commands/env' },
{ text: 'pf', link: '/commands/pf' },
{ text: 'kill', link: '/commands/kill' },
],
},
{
text: 'Utilities',
items: [
{ text: 'doctor', link: '/commands/doctor' },
{ text: 'version', link: '/commands/version' },
{ text: 'completion', link: '/commands/completion' },
],
},
],
},
socialLinks: [
{ icon: 'github', link: 'https://github.com/Robert27/eggl-cli' },
],
search: {
provider: 'local',
},
},
})
14 changes: 14 additions & 0 deletions docs/.vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script setup lang="ts">
import DefaultTheme from 'vitepress/theme'
import SiteFooter from './components/SiteFooter.vue'

const Layout = DefaultTheme.Layout
</script>

<template>
<Layout>
<template #layout-bottom>
<SiteFooter />
</template>
</Layout>
</template>
Loading
Loading