Skip to content

Commit 8640e32

Browse files
authored
Merge pull request #1 from mambax7/master
chore: initial Astro + Starlight setup
2 parents a84a2ed + 27b3e53 commit 8640e32

46 files changed

Lines changed: 5014 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
name: Build Docs
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v4
19+
with:
20+
version: 9
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
cache: 'pnpm'
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Build all docs
32+
run: pnpm build:all
33+
34+
# Merge both build outputs into one deploy folder
35+
- name: Merge build outputs
36+
run: |
37+
mkdir -p dist-all
38+
cp -r apps/docs-27/dist/* dist-all/
39+
cp -r apps/docs-4x/dist/* dist-all/
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: dist-all/
45+
46+
deploy:
47+
name: Deploy to GitHub Pages
48+
needs: build
49+
runs-on: ubuntu-latest
50+
# Only deploy on push to master, not on PRs
51+
if: github.event_name == 'push'
52+
permissions:
53+
pages: write
54+
id-token: write
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
dist/
3+
.astro/
4+
*.local
5+
.env

apps/docs-27/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

apps/docs-27/.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

apps/docs-27/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Starlight Starter Kit: Basics
2+
3+
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
4+
5+
```
6+
pnpm create astro@latest -- --template starlight
7+
```
8+
9+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
10+
11+
## 🚀 Project Structure
12+
13+
Inside of your Astro + Starlight project, you'll see the following folders and files:
14+
15+
```
16+
.
17+
├── public/
18+
├── src/
19+
│ ├── assets/
20+
│ ├── content/
21+
│ │ └── docs/
22+
│ └── content.config.ts
23+
├── astro.config.mjs
24+
├── package.json
25+
└── tsconfig.json
26+
```
27+
28+
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
29+
30+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
31+
32+
Static assets, like favicons, can be placed in the `public/` directory.
33+
34+
## 🧞 Commands
35+
36+
All commands are run from the root of the project, from a terminal:
37+
38+
| Command | Action |
39+
| :------------------------ | :----------------------------------------------- |
40+
| `pnpm install` | Installs dependencies |
41+
| `pnpm dev` | Starts local dev server at `localhost:4321` |
42+
| `pnpm build` | Build your production site to `./dist/` |
43+
| `pnpm preview` | Preview your build locally, before deploying |
44+
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
45+
| `pnpm astro -- --help` | Get help using the Astro CLI |
46+
47+
## 👀 Want to learn more?
48+
49+
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).

apps/docs-27/astro.config.mjs

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
// apps/docs-27/astro.config.mjs
2+
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
4+
5+
export default defineConfig({
6+
// The base path for this version — critical for URL structure
7+
base: '/2.7',
8+
9+
integrations: [
10+
starlight({
11+
title: 'XOOPS 2.7 Docs',
12+
logo: {
13+
src: './src/assets/xoops-logo.svg',
14+
},
15+
components: {
16+
// Replaces the default SiteTitle with your version switcher next to it
17+
SiteTitle: './src/components/SiteTitleWithVersion.astro',
18+
},
19+
// Default language = English (no prefix in URL)
20+
defaultLocale: 'en',
21+
locales: {
22+
// Root = English: docu.xoops.org/2.7/quick-start/
23+
root: { label: 'English', lang: 'en' },
24+
// German: docu.xoops.org/2.7/de/quick-start/
25+
de: { label: 'Deutsch', lang: 'de' },
26+
// French: docu.xoops.org/2.7/fr/quick-start/
27+
fr: { label: 'Français', lang: 'fr' },
28+
// Arabic: docu.xoops.org/2.7/ar/quick-start/ (RTL)
29+
ar: { label: 'العربية', lang: 'ar', dir: 'rtl' },
30+
},
31+
32+
sidebar: [
33+
{
34+
label: 'Getting Started',
35+
translations: {
36+
de: 'Erste Schritte',
37+
fr: 'Démarrer',
38+
ar: 'البدء',
39+
},
40+
items: [
41+
{ slug: 'quick-start' },
42+
{ slug: 'installation' },
43+
{ slug: 'configuration' },
44+
],
45+
},
46+
{
47+
label: 'Module Development',
48+
translations: {
49+
de: 'Modulentwicklung',
50+
fr: 'Développement de modules',
51+
},
52+
items: [
53+
{ slug: 'module-guide/introduction' },
54+
{ slug: 'module-guide/structure' },
55+
{ slug: 'module-guide/xoops-object' },
56+
],
57+
},
58+
{
59+
label: 'Theme Development',
60+
items: [
61+
{ slug: 'theme-guide/introduction' },
62+
{ slug: 'theme-guide/smarty-variables' },
63+
],
64+
},
65+
{
66+
label: 'Upgrading',
67+
items: [
68+
{ slug: 'migration/from-2-6' },
69+
{ slug: 'migration/from-wordpress' },
70+
],
71+
},
72+
],
73+
74+
// GitHub edit links
75+
editLink: {
76+
baseUrl: 'https://github.com/XOOPS/xoops-docs/edit/main/apps/docs-27/',
77+
},
78+
79+
// Last updated timestamps
80+
lastUpdated: true,
81+
82+
// Social links
83+
social: {
84+
github: 'https://github.com/XOOPS/xoops-docs',
85+
},
86+
}),
87+
],
88+
});

apps/docs-27/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "docs-27",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"start": "astro dev",
8+
"build": "astro build",
9+
"preview": "astro preview",
10+
"astro": "astro"
11+
},
12+
"dependencies": {
13+
"@astrojs/starlight": "^0.38.4",
14+
"astro": "^6.1.9",
15+
"sharp": "^0.34.5"
16+
}
17+
}

apps/docs-27/public/favicon.svg

Lines changed: 1 addition & 0 deletions
Loading
96.2 KB
Loading

0 commit comments

Comments
 (0)