Skip to content

📝 Add docs site #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4754ab0
♻️ Switch to pnpm and packages
CollierCZ Jun 22, 2025
6081950
👷 Checkout before testing
CollierCZ Jun 22, 2025
49791f0
💚 Set commands on root level
CollierCZ Jun 22, 2025
c636e89
📝 Add basic docs site with content from ReadMe
CollierCZ Jun 22, 2025
6e4c825
🐛 Don't process code blocks with Markdoc examples
CollierCZ Jun 22, 2025
d3a6faf
👷 Build before testing to get the right SvelteKit files
CollierCZ Jun 22, 2025
0873b66
🎨 Prettify
CollierCZ Jun 22, 2025
1637562
🐛 Vary page name on navigation
CollierCZ Jun 22, 2025
30b951f
🐛 Allow undefined languages for code blocks
CollierCZ Jun 22, 2025
c183214
✨ Add basic navigation
CollierCZ Jun 22, 2025
f7dca45
➖ Remove unused dependency
CollierCZ Jun 22, 2025
14b7b53
⬆️ Bump dependencies
CollierCZ Jun 22, 2025
a01db0c
🎨 Prettify
CollierCZ Jun 22, 2025
7735ea7
👷 Add pages deployment
CollierCZ Jun 22, 2025
1341ad6
🐛 Fix tailwind after upgrade
CollierCZ Jun 22, 2025
38a0ce1
🐛 Fix broken link
CollierCZ Jun 22, 2025
472ed6d
🚨 Fix importng for ESLint
CollierCZ Jun 23, 2025
2fb4908
🔥 Remove unused config file
CollierCZ Jun 23, 2025
7a07e84
🚨 Resolve some linting issues
CollierCZ Jun 23, 2025
d082e08
🔀 Merge main into docs
CollierCZ Jun 23, 2025
727db2c
⬆️ Use latest version of processer for CI
CollierCZ Jun 23, 2025
d0344bc
🚨 Fix some more linting issues
CollierCZ Jun 23, 2025
5caf53d
✅ Add a basic test for copying code
CollierCZ Jun 23, 2025
bed08d2
🎨 Prettify
CollierCZ Jun 23, 2025
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
10 changes: 8 additions & 2 deletions .github/shared/setup-node/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ description: "Setup Node.js environment and dependencies"
runs:
using: "composite"
steps:
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Install Node.js with cache
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: 'pnpm'
- name: Install Dependencies
shell: bash
run: npm ci
run: pnpm install
5 changes: 3 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- uses: "./.github/shared/setup-node"
- name: Lint
run: npm run lint
run: pnpm lint
44 changes: 44 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy docs to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
paths:
- packages/docs/**

# Enables manual deployments from the Actions tab
workflow_dispatch:

# Sets permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# Do NOT cancel in-progress runs to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: "./.github/shared/setup-node"
- run: pnpm --filter "markdoc-svelte-docs" build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
10 changes: 6 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ jobs:
test-svelte:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- uses: "./.github/shared/setup-node"
- name: Test
run: npm run test
# Build before test to get the SvelteKit files
- name: Test build
run: npm run build
run: pnpm build
- name: Test
run: pnpm test
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Built files
dist
.svelte-kit
build

# Dependencies
node_modules
.npmrc

coverage
# Test files
coverage
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dist
node_modules
.npmrc

coverage

pnpm-lock.yaml
Loading
Loading