Skip to content

Docs site for inertia-django adapter #67

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

Merged
merged 22 commits into from
Mar 25, 2025
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
55 changes: 55 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy Docs

on:
push:
branches: [main]

workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN 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.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
- name: Build with VitePress
run: npm run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.vitepress/dist
.vitepress/cache
107 changes: 107 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
import { defineConfig } from "vitepress";

const title = "Inertia Django";
const description = "Build single page apps, without building an API";
const site = "https://inertia-django.dev";
const image = `${site}/og_image.png`;

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: title,
description: description,

cleanUrls: true,

head: [
["link", { rel: "icon", href: "/favicon.ico", sizes: "32x32" }],
["link", { rel: "icon", href: "/icon.svg", type: "image/svg+xml" }],

["meta", { name: "twitter:card", content: "summary_large_image" }],
["meta", { name: "twitter:site", content: site }],
["meta", { name: "twitter:description", value: description }],
["meta", { name: "twitter:image", content: image }],

["meta", { property: "og:type", content: "website" }],
["meta", { property: "og:locale", content: "en_US" }],
["meta", { property: "og:site", content: site }],
["meta", { property: "og:site_name", content: title }],
["meta", { property: "og:image", content: image }],
["meta", { property: "og:description", content: description }],
],

themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Home", link: "/" },
{ text: "Guide", link: "/guide" },
{
text: "Links",
items: [
{
text: "Official Inertia.js docs",
link: "https://inertiajs.com",
},
{
text: "inertia-django on PyPI",
link: "https://pypi.org/project/inertia-django",
},
],
},
],

logo: "/logo.svg",

sidebar: {
"/guide/": [
{
items: [{ text: "Introduction", link: "/guide" }],
},
{
text: "Installation",
items: [
{
text: "Server-side",
link: "/guide/server-side-setup",
},
{
text: "Client-side",
link: "/guide/client-side-setup",
},
],
},
{
text: "Core concepts",
items: [
{ text: "Who is it for", link: "/guide/who-is-it-for" },
{ text: "How it works", link: "/guide/how-it-works" },
{ text: "The protocol", link: "/guide/the-protocol" },
],
},
{
text: "The basics",
items: [{ text: "Links", link: "/guide/links" }],
},
{
text: "Advanced",
items: [
{
text: "Scroll management",
link: "/guide/scroll-management",
},
{
text: "Code splitting",
link: "/guide/code-splitting",
},
],
},
],
},

socialLinks: [
{
icon: "github",
link: "https://github.com/inertiajs/inertia-django",
},
],
},
});
Loading
Loading