[READ-ONLY] Mirror of https://github.com/flo-bit/tiny-docs. quick setup, simple, minimalistic docs for your github project flo-bit.dev/tiny-docs/
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #1 from flo-bit/release/v1

Release/v1

author
Florian
committer
GitHub
date (Oct 26, 2025, 9:36 PM +0100) commit e064175f parent 73540d8b
+108 -1
+107
.github/workflows/tiny-docs.yml
··· 1 + name: Tiny Docs (Reusable) 2 + 3 + on: 4 + workflow_call: 5 + inputs: 6 + tiny_docs_repo: 7 + description: "Owner/Repo of your tiny-docs source" 8 + required: false 9 + type: string 10 + default: flo-bit/tiny-docs 11 + site: 12 + description: "Docs site domain (default: <owner>.github.io)" 13 + required: false 14 + type: string 15 + base: 16 + description: "Docs base path (default: /<repo-name>)" 17 + required: false 18 + type: string 19 + name: 20 + description: "Project name (default: <repo-name>)" 21 + required: false 22 + type: string 23 + 24 + permissions: 25 + contents: read 26 + pages: write 27 + id-token: write 28 + 29 + jobs: 30 + build: 31 + runs-on: ubuntu-latest 32 + steps: 33 + - name: Checkout target repository 34 + uses: actions/checkout@v4 35 + 36 + - name: Ensure docs-builder exists (checkout tiny-docs if missing) 37 + if: ${{ hashFiles('docs-builder/**') == '' }} 38 + uses: actions/checkout@v4 39 + with: 40 + repository: ${{ inputs.tiny_docs_repo }} 41 + path: docs-builder 42 + 43 + - name: Derive defaults (owner/repo → site/base/name) 44 + id: derive 45 + shell: bash 46 + env: 47 + IN_SITE: ${{ inputs.site }} 48 + IN_BASE: ${{ inputs.base }} 49 + IN_NAME: ${{ inputs.name }} 50 + run: | 51 + set -euo pipefail 52 + OWNER="${GITHUB_REPOSITORY%/*}" 53 + REPO="${GITHUB_REPOSITORY#*/}" 54 + 55 + SITE_DEFAULT="${OWNER}.github.io" 56 + BASE_DEFAULT="/${REPO}" 57 + NAME_DEFAULT="${REPO}" 58 + 59 + SITE="${IN_SITE:-}" 60 + BASE="${IN_BASE:-}" 61 + NAME="${IN_NAME:-}" 62 + 63 + SITE="${SITE:-$SITE_DEFAULT}" 64 + BASE="${BASE:-$BASE_DEFAULT}" 65 + NAME="${NAME:-$NAME_DEFAULT}" 66 + 67 + echo "site=$SITE" >> "$GITHUB_OUTPUT" 68 + echo "base=$BASE" >> "$GITHUB_OUTPUT" 69 + echo "name=$NAME" >> "$GITHUB_OUTPUT" 70 + 71 + - name: Create docs/config.json if missing 72 + shell: bash 73 + run: | 74 + set -euo pipefail 75 + mkdir -p docs 76 + if [ ! -f docs/config.json ]; then 77 + SITE='${{ steps.derive.outputs.site }}' 78 + BASE='${{ steps.derive.outputs.base }}' 79 + NAME='${{ steps.derive.outputs.name }}' 80 + 81 + if command -v jq >/dev/null 2>&1; then 82 + jq -n --arg site "$SITE" --arg base "$BASE" --arg name "$NAME" \ 83 + '{site:$site, base:$base, name:$name}' > docs/config.json 84 + else 85 + printf '{\n "site": "%s",\n "base": "%s",\n "name": "%s"\n}\n' \ 86 + "$SITE" "$BASE" "$NAME" > docs/config.json 87 + fi 88 + echo "Created docs/config.json, site=$SITE, base=$BASE, name=$NAME" 89 + else 90 + echo "docs/config.json already exists; leaving it unchanged." 91 + fi 92 + 93 + - name: Install, build, and upload the site artifact 94 + uses: withastro/action@v3 95 + with: 96 + path: docs-builder/ 97 + 98 + deploy: 99 + needs: build 100 + runs-on: ubuntu-latest 101 + environment: 102 + name: github-pages 103 + url: ${{ steps.deployment.outputs.page_url }} 104 + steps: 105 + - name: Deploy to GitHub Pages 106 + id: deployment 107 + uses: actions/deploy-pages@v4
+1 -1
src/content.config.ts
··· 11 11 12 12 const docs = defineCollection({ 13 13 loader: glob({ 14 - pattern: ["docs/**/[^_]*.{md,mdx}", "README.md"], 14 + pattern: ["docs/**/[^_]*.{md,mdx}", "*([Rr][Ee][Aa][Dd][Mm][Ee]).{md,mdx}"], 15 15 base: "../", 16 16 }), 17 17 // Type-check frontmatter using a schema