Skip to content

Commit 5c7b743

Browse files
committed
docs: setup GitHub Pages with Jekyll
- Rename INDEX.md to index.md (lowercase for GitHub Pages) - Add Jekyll configuration (_config.yml) with Cayman theme - Add GitHub Actions workflow for automatic deployment - Create docs/README.md with setup instructions - Update all internal links to work with GitHub Pages - Add Jekyll front matter to index.md - Configure navigation and documentation structure Documentation will be available at: https://xpodev.github.io/react-pkl/ To enable GitHub Pages: 1. Go to repository Settings > Pages 2. Set Source to 'GitHub Actions' 3. The workflow will automatically deploy on push to main/master
1 parent 0269d9a commit 5c7b743

File tree

4 files changed

+253
-48
lines changed

4 files changed

+253
-48
lines changed

.github/workflows/pages.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy Documentation to GitHub Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["main", "master"]
7+
paths:
8+
- 'docs/**'
9+
- 'README.md'
10+
- '.github/workflows/pages.yml'
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: false
26+
27+
jobs:
28+
# Build job
29+
build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Setup Pages
36+
uses: actions/configure-pages@v4
37+
38+
- name: Build with Jekyll
39+
uses: actions/jekyll-build-pages@v1
40+
with:
41+
source: ./docs
42+
destination: ./_site
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
47+
# Deployment job
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

docs/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# React PKL Documentation
2+
3+
This directory contains the comprehensive documentation for React PKL.
4+
5+
## 📖 View Documentation
6+
7+
**Online:** Visit [https://xpodev.github.io/react-pkl/](https://xpodev.github.io/react-pkl/)
8+
9+
**Locally:** Browse the markdown files in this directory.
10+
11+
## 📚 Available Documentation
12+
13+
- **[index.md](./index.md)** - Documentation index and navigation
14+
- **[GETTING_STARTED.md](./GETTING_STARTED.md)** - Step-by-step guide for beginners
15+
- **[API.md](./API.md)** - Complete API reference
16+
- **[EXAMPLES.md](./EXAMPLES.md)** - Example walkthrough
17+
- **[QUICK_REFERENCE.md](./QUICK_REFERENCE.md)** - Quick reference guide
18+
- **[ADVANCED.md](./ADVANCED.md)** - Advanced usage patterns
19+
- **[THEME_SYSTEM.md](./THEME_SYSTEM.md)** - Theme system guide
20+
- **[ARCHITECTURE.md](./ARCHITECTURE.md)** - Architecture overview
21+
- **[CONTRIBUTING.md](./CONTRIBUTING.md)** - Contribution guidelines
22+
23+
## 🚀 Quick Start
24+
25+
If you're new to React PKL:
26+
27+
1. Read the [main README](../README.md) for project overview
28+
2. Follow the [Getting Started Guide](./GETTING_STARTED.md)
29+
3. Explore the [Examples](./EXAMPLES.md)
30+
31+
## 🔧 GitHub Pages Setup
32+
33+
This documentation is configured for GitHub Pages using Jekyll:
34+
35+
- **Theme:** Cayman (defined in `_config.yml`)
36+
- **Configuration:** See `_config.yml` for settings
37+
- **Base URL:** `/react-pkl`
38+
39+
### Local Preview
40+
41+
To preview the documentation locally with Jekyll:
42+
43+
```bash
44+
# Install Jekyll (if not already installed)
45+
gem install bundler jekyll
46+
47+
# Serve the documentation
48+
cd docs
49+
jekyll serve
50+
```
51+
52+
Then visit `http://localhost:4000/react-pkl/`
53+
54+
## 📝 Contributing to Documentation
55+
56+
When updating documentation:
57+
58+
1. Follow markdown best practices
59+
2. Keep examples up-to-date with code
60+
3. Cross-reference related topics
61+
4. Test links work correctly
62+
5. Use clear, concise language
63+
64+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.
65+
66+
## 📄 License
67+
68+
Same as the main project - see [../LICENSE](../LICENSE) if available.

docs/_config.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# GitHub Pages Jekyll Configuration for React PKL Documentation
2+
3+
# Site settings
4+
title: React PKL
5+
description: A typesafe plugin system for React applications
6+
baseurl: "/react-pkl"
7+
url: "https://xpodev.github.io"
8+
9+
# Build settings
10+
theme: jekyll-theme-cayman
11+
markdown: kramdown
12+
kramdown:
13+
input: GFM
14+
syntax_highlighter: rouge
15+
16+
# Navigation
17+
navigation:
18+
- title: Home
19+
url: /
20+
- title: Getting Started
21+
url: /GETTING_STARTED
22+
- title: API Reference
23+
url: /API
24+
- title: Examples
25+
url: /EXAMPLES
26+
- title: Architecture
27+
url: /ARCHITECTURE
28+
- title: Theme System
29+
url: /THEME_SYSTEM
30+
31+
# Exclude from processing
32+
exclude:
33+
- node_modules/
34+
- vendor/
35+
- .git/
36+
- .gitignore
37+
- package.json
38+
- package-lock.json
39+
- tsconfig.json
40+
- README.md
41+
42+
# Include
43+
include:
44+
- _config.yml
45+
46+
# Plugins
47+
plugins:
48+
- jekyll-optional-front-matter
49+
- jekyll-readme-index
50+
- jekyll-relative-links
51+
- jekyll-titles-from-headings
52+
53+
# Optional front matter
54+
optional_front_matter:
55+
remove_originals: false
56+
57+
# Relative links
58+
relative_links:
59+
enabled: true
60+
collections: false
61+
62+
# Titles from headings
63+
titles_from_headings:
64+
enabled: true
65+
strip_title: true
66+
collections: false

0 commit comments

Comments
 (0)