Skip to content
Merged
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
51 changes: 51 additions & 0 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SPDX-FileCopyrightText: 2026 Mikkel Bergmann
# SPDX-License-Identifier: MIT
name: Deploy site
on:
push:
branches: [main]
paths:
- 'site/**'
- 'docs/**'
- 'CHANGELOG.md'
- 'examples/**'
- 'llms.txt'
- '.github/workflows/deploy-site.yml'
workflow_dispatch:

# Allow GITHUB_TOKEN to deploy to Pages, and only one concurrent deploy.
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@v5
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: site/package-lock.json
- run: npm ci
working-directory: site
- run: npm run build
working-directory: site
- uses: actions/upload-pages-artifact@v3
with:
path: site/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
21 changes: 21 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Mikkel Bergmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ path = [
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Mikkel Bergmann"
SPDX-License-Identifier = "CC-BY-4.0"

# The website (site/) is software/tooling — MIT. Covers committed files that can't
# carry an inline SPDX header (JSON, package-lock, MDX); source files that do carry a
# header agree with this. Generated + dependency files are gitignored, so unscanned.
[[annotations]]
path = ["site/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Mikkel Bergmann"
SPDX-License-Identifier = "MIT"
17 changes: 17 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: 2026 Mikkel Bergmann
# SPDX-License-Identifier: MIT

# build + deps
node_modules/
dist/
.astro/

# generated public asset (single-sourced from ../../llms.txt by scripts/sync-docs.mjs)
public/llms.txt

# generated docs pages (single-sourced from ../docs, ../CHANGELOG.md, ../examples
# by scripts/sync-docs.mjs). index.mdx is hand-written and committed.
src/content/docs/reference/
src/content/docs/guide/
src/content/docs/examples.md
src/content/docs/changelog.md
52 changes: 52 additions & 0 deletions site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// SPDX-FileCopyrightText: 2026 Mikkel Bergmann
// SPDX-License-Identifier: MIT
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';

// Custom TextMate grammar so ```podscript code blocks highlight everywhere.
const podscriptGrammar = JSON.parse(
readFileSync(fileURLToPath(new URL('./grammars/podscript.tmLanguage.json', import.meta.url)), 'utf8'),
);

const GITHUB = 'https://github.com/mikkel-bergmann/podscript';

// https://astro.build/config
export default defineConfig({
// Project GitHub Pages: served under /podscript. If a custom domain is added
// later, drop `base` (and update BASE in scripts/sync-docs.mjs) and add a CNAME.
site: 'https://mikkel-bergmann.github.io',
base: '/podscript',
integrations: [
starlight({
title: 'Podscript',
description: 'Podcasts as code — write your episode as one plain-text file and compile it to identical audio every time.',
favicon: '/favicon.svg',
social: [{ icon: 'github', label: 'GitHub', href: GITHUB }],
// No editLink: pages are generated from ../docs by scripts/sync-docs.mjs, so a
// per-page edit URL would point at a gitignored file. Edit the canonical docs/ instead.
expressiveCode: {
// Register the language; fenced ```podscript blocks pick it up.
shiki: { langs: [podscriptGrammar] },
},
sidebar: [
{ label: 'Guide', items: [{ label: 'Authoring cheatsheet', slug: 'guide/authoring' }] },
{
label: 'Reference',
items: [
{ label: 'Specification', slug: 'reference/spec' },
{ label: 'Glossary', slug: 'reference/glossary' },
],
},
{
label: 'Resources',
items: [
{ label: 'Examples', slug: 'examples' },
{ label: 'Changelog', slug: 'changelog' },
],
},
],
}),
],
});
67 changes: 67 additions & 0 deletions site/grammars/podscript.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"name": "podscript",
"displayName": "Podscript",
"scopeName": "source.podscript",
"aliases": ["pod"],
"patterns": [
{ "include": "#comment" },
{ "include": "#version" },
{ "include": "#blocks" },
{ "include": "#directives" },
{ "include": "#clauses" },
{ "include": "#inline" },
{ "include": "#label" },
{ "include": "#string" },
{ "include": "#number" }
],
"repository": {
"comment": {
"match": "^\\s*#.*$",
"name": "comment.line.number-sign.podscript"
},
"version": {
"match": "^(podscript)\\s*(:)",
"captures": {
"1": { "name": "keyword.control.podscript" },
"2": { "name": "punctuation.separator.podscript" }
}
},
"blocks": {
"match": "^\\s*(meta|voices|assets|pronounce)\\s*(:)",
"captures": {
"1": { "name": "keyword.control.section.podscript" },
"2": { "name": "punctuation.separator.podscript" }
}
},
"directives": {
"match": "^\\s*(scene)\\b|\\b(bed|music|ambience|atmos|sfx|sting|pause)\\b",
"captures": {
"1": { "name": "keyword.control.scene.podscript" },
"2": { "name": "support.function.directive.podscript" }
}
},
"clauses": {
"match": "\\b(gain|fade-in|fade-out|crossfade|duck-under|prosody|after|with|before|at|loop|once|over|to|attack|release|rate|pitch|volume|style|preset|provider|language|voice|say|as|break)\\b",
"name": "keyword.other.clause.podscript"
},
"inline": {
"patterns": [
{ "match": "\\*[^*\\n]+\\*", "name": "markup.bold.emphasis.podscript" },
{ "match": "\\{[^}\\n]*\\}", "name": "meta.inline.brace.podscript" },
{ "match": "\\.\\.\\.", "name": "punctuation.definition.break.podscript" }
]
},
"label": {
"match": "#[A-Za-z_][A-Za-z0-9_-]*",
"name": "entity.name.tag.label.podscript"
},
"string": {
"match": "\"[^\"\\n]*\"",
"name": "string.quoted.double.podscript"
},
"number": {
"match": "[+-]?\\b\\d+(\\.\\d+)?(db|ms|s|st)?\\b",
"name": "constant.numeric.podscript"
}
}
}
Loading