Skip to content

Commit

Permalink
move wiki to its own site
Browse files Browse the repository at this point in the history
  • Loading branch information
Aylur committed Dec 28, 2023
1 parent b2dc5f0 commit 156e7d7
Show file tree
Hide file tree
Showing 42 changed files with 11,282 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy Docs to GitHub Pages

on:
push:
paths:
- 'docs/**'

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3
- name: Install, build, and upload your site
uses: withastro/action@v1
with:
path: ./docs # The root location of your Astro project inside the repository. (optional)

deploy:
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@v1
21 changes: 21 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
10 changes: 10 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Developing

```bash
npm install
npm run dev
```

## Sidebar

To edit the side bar edit `astro.config.mjs`
81 changes: 81 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

const base = '/ags-docs';

const config = [
'Installation',
'JavaScript',
'First Widgets',
'Reactivity',
'Theeming',
'Config Object',
'Type Checking',
'CLI',
'Widgets',
'Variables',
'Services',
'Utils',
'Custom Service',
'Subclassing GTK Widgets',
'Examples',
];

const widgets = [
'Window',
'Box',
'Button',
'CenterBox',
'CircularProgress',
'Entry',
'EventBox',
'Icon',
'Label',
'Overlay',
'ProgressBar',
'Revealer',
'Scrollable',
'Slider',
'Stack',
'Menu',
'MenuItem',
];

// https://astro.build/config
export default defineConfig({
site: 'https://aylur.github.io',
base,
integrations: [
starlight({
title: 'AGS Wiki',
editLink: {
baseUrl: 'https://github.com/Aylur/ags/docs/',
},
social: {
github: 'https://github.com/Aylur/ags',
discord: 'https://discord.gg/CXQpHwDuhY',
},
customCss: ['./src/styles/custom.css'],
sidebar: [
{
label: 'Configuration',
items: config.map(label => ({
label, link: 'config/' + label.toLowerCase().replaceAll(' ', '-'),
})),
},
{
label: 'Builtin Services',
collapsed: true,
autogenerate: { directory: '/services' },
},
{
label: 'Builtin Widgets',
collapsed: true,
items: widgets.map(label => ({
label, link: 'config/widgets#' + label.toLowerCase(),
})),
},
],
}),
],
});
Loading

0 comments on commit 156e7d7

Please sign in to comment.