Skip to content

Commit 45acf43

Browse files
docs: use vitepress to generate website
1 parent db21203 commit 45acf43

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2711
-1240
lines changed

.github/workflows/deploy.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Enable running this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow one concurrent deployment
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: true
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
- name: Setup Pages
29+
uses: actions/configure-pages@v2
30+
- name: Install dependencies
31+
run: npm ci
32+
- name: Build with VitePress
33+
run: npm run-script docs:build
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v1
36+
37+
deploy:
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
needs: build
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v1

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ vendor
1313

1414
# Documentation
1515
_site
16-
.sass-cache
17-
.jekyll-cache
18-
.jekyll-metadata
1916

2017
# Environment variables
2118
*.env

README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,25 @@ Publish content to your website using apps like [iAWriter](https://ia.net/writer
1919
- Syndicate content to third-party websites
2020
- Publication presets to support popular static site generators
2121
- Localised to different languages
22-
- [Plug-in API](https://getindiekit.com/plugin-api/)
22+
- [Plug-in API](https://getindiekit.com/plugins/api/)
2323

2424
## Requirements
2525

2626
- Node.js v18+
2727

2828
## Install
2929

30-
Learn how to [set up an Indiekit server](https://getindiekit.com/get-started/) and view an [example server configuration](https://github.com/paulrobertlloyd/paulrobertlloyd-indiekit/blob/main/index.js).
30+
Learn how to [set up an Indiekit server](https://getindiekit.com/get-started) and view an [example server configuration](https://github.com/paulrobertlloyd/paulrobertlloyd-indiekit/blob/main/index.js).
31+
32+
## Documentation website
33+
34+
The documentation website is generated using [VitePress](https://vitepress.vuejs.org). To view this site locally:
35+
36+
1. Install this project’s dependencies: `npm install`
37+
2. Start Jekyll’s server: `npm run docs:dev`
38+
3. View the documentation: <http://127.0.0.1:5173>
39+
40+
The browser will refresh to reflect any changes you make to the documentation.
3141

3242
## Decisions
3343

docs/.vitepress/config.js

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
import { version } from "../../packages/indiekit/package.json" assert { type: "json" };
2+
3+
const sidebar = [
4+
{
5+
text: "Introduction",
6+
items: [
7+
{ text: "How Indiekit works", link: "/introduction" },
8+
{ text: "Core concepts", link: "/concepts" },
9+
{ text: "Get started", link: "/get-started" },
10+
{ text: "Contributing", link: "/contributing" },
11+
],
12+
},
13+
{
14+
text: "Configuration",
15+
items: [
16+
{ text: "Options", link: "/configuration/" },
17+
{ text: "Post types", link: "/configuration/post-types" },
18+
{ text: "Post template", link: "/configuration/post-template" },
19+
{ text: "Commit messages", link: "/configuration/commit-messages" },
20+
{ text: "Localisation", link: "/configuration/localisation" },
21+
{ text: "Time zone", link: "/configuration/time-zone" },
22+
],
23+
},
24+
];
25+
26+
const sidebarPlugins = [
27+
{
28+
text: "Plug-ins",
29+
items: [
30+
{ text: "Content stores", link: "/plugins/stores" },
31+
{ text: "Endpoints", link: "/plugins/endpoints" },
32+
{ text: "Publication presets", link: "/plugins/presets" },
33+
{ text: "Syndicators", link: "/plugins/syndicators" },
34+
],
35+
},
36+
{
37+
text: "Plug-in API",
38+
items: [
39+
{ text: "Introduction", link: "/plugins/api/" },
40+
{
41+
text: "<code>Indiekit.addEndpoint</code>",
42+
link: "/plugins/api/add-endpoint",
43+
},
44+
{
45+
text: "<code>Indiekit.addPreset</code>",
46+
link: "/plugins/api/add-preset",
47+
},
48+
{
49+
text: "<code>Indiekit.addStore</code>",
50+
link: "/plugins/api/add-store",
51+
},
52+
{
53+
text: "<code>Indiekit.addSyndicator</code>",
54+
link: "/plugins/api/add-syndicator",
55+
},
56+
{
57+
text: "<code>IndiekitError</code>",
58+
link: "/plugins/api/error",
59+
},
60+
],
61+
},
62+
];
63+
64+
/**
65+
* @type {import("vitepress").UserConfig}
66+
*/
67+
export default {
68+
title: "Indiekit",
69+
description:
70+
"The little server that connects your website to the independent web.",
71+
head: [
72+
["link", { rel: "icon", href: "icon.svg" }],
73+
["meta", { name: "supported-color-schemes", content: "light dark" }],
74+
["meta", { name: "theme-color", content: "#60c" }],
75+
["meta", { name: "twitter:card", content: "summary_large_image" }],
76+
["meta", { name: "twitter:image", content: "opengraph-image.png" }],
77+
["meta", { property: "og:image", content: "opengraph-image.png" }],
78+
],
79+
lang: "en-GB",
80+
cleanUrls: "without-subfolders",
81+
algolia: {
82+
appId: "V4LLZ2HXJR",
83+
apiKey: "9d1eb8e9b7846f4c6eef9fff9572fb0f",
84+
indexName: "indiekit",
85+
},
86+
markdown: {
87+
linkify: false,
88+
},
89+
outDir: "../_site",
90+
themeConfig: {
91+
editLink: {
92+
pattern: "https://github.com/getindiekit/indiekit/edit/main/docs/:path",
93+
text: "Edit this page on GitHub",
94+
},
95+
footer: {
96+
message:
97+
'Distributed under the <a href="https://github.com/getindiekit/indiekit/blob/main/LICENSE">MIT License</a>.',
98+
copyright: ${new Date().getFullYear()} Paul Robert Lloyd`,
99+
},
100+
logo: {
101+
dark: {
102+
src: "icon.svg#dark",
103+
},
104+
light: {
105+
src: "icon.svg",
106+
},
107+
},
108+
nav: [
109+
{
110+
text: "Documentation",
111+
link: "/introduction",
112+
},
113+
{
114+
text: "Plug-ins",
115+
link: "/plugins/",
116+
activeMatch: "/plugins/",
117+
},
118+
{
119+
text: version,
120+
link: "https://github.com/getindiekit/indiekit/releases",
121+
},
122+
{
123+
text: "🇺🇦",
124+
link: "https://www.withukraine.org",
125+
},
126+
],
127+
sidebar: {
128+
"/": sidebar,
129+
"/plugins/": sidebarPlugins,
130+
},
131+
socialLinks: [
132+
{ icon: "github", link: "https://github.com/getindiekit/indiekit" },
133+
],
134+
},
135+
};

docs/.vitepress/theme/custom.css

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
:root {
2+
--indigo-h-s: 224deg 100%;
3+
--white-h-s: 224deg 33%;
4+
--neutral-h-s: 224deg 10%;
5+
--brand-h-s: 270deg 100%;
6+
7+
--vp-c-brand-lighter: hsl(var(--brand-h-s) 90%);
8+
--vp-c-brand-light: hsl(var(--brand-h-s) 70%);
9+
--vp-c-brand: hsl(var(--brand-h-s) 40%);
10+
--vp-c-brand-dark: hsl(var(--brand-h-s) 30%);
11+
--vp-c-brand-darker: hsl(var(--brand-h-s) 10%);
12+
13+
--vp-c-white-soft: hsl(var(--white-h-s) 97%);
14+
15+
--vp-c-gray-dark-5: hsl(var(--neutral-h-s) 5%);
16+
--vp-c-gray-dark-4: hsl(var(--neutral-h-s) 10%);
17+
--vp-c-gray-dark-3: hsl(var(--neutral-h-s) 25%);
18+
--vp-c-gray-dark-2: hsl(var(--neutral-h-s) 33%);
19+
--vp-c-gray-dark-1: hsl(var(--neutral-h-s) 40%);
20+
--vp-c-gray: hsl(var(--neutral-h-s) 50%);
21+
--vp-c-gray-light-1: hsl(var(--neutral-h-s) 60%);
22+
--vp-c-gray-light-2: hsl(var(--neutral-h-s) 67%);
23+
--vp-c-gray-light-3: hsl(var(--neutral-h-s) 75%);
24+
--vp-c-gray-light-4: hsl(var(--neutral-h-s) 90%);
25+
--vp-c-gray-light-5: hsl(var(--neutral-h-s) 95%);
26+
27+
--vp-c-indigo-lighter: hsl(var(--indigo-h-s) 90%);
28+
--vp-c-indigo-light: hsl(var(--indigo-h-s) 70%);
29+
--vp-c-indigo: hsl(var(--indigo-h-s) 50%);
30+
--vp-c-indigo-dark: hsl(var(--indigo-h-s) 30%);
31+
--vp-c-indigo-darker: hsl(var(--indigo-h-s) 10%);
32+
--vp-c-indigo-soft: hsl(var(--indigo-h-s) 10% / 0.75);
33+
34+
--vp-c-divider-light-1: hsl(var(--neutral-h-s) 50% / 0.25);
35+
--vp-c-divider-light-2: hsl(var(--neutral-h-s) 50% / 0.125);
36+
--vp-c-divider-dark-1: hsl(var(--neutral-h-s) 50% / 0.5);
37+
--vp-c-divider-dark-2: hsl(var(--neutral-h-s) 50% / 0.33);
38+
39+
--vp-c-text-light-1: var(--vp-c-black);
40+
--vp-c-text-light-2: var(--vp-c-gray-dark-3);
41+
--vp-c-text-light-3: var(--vp-c-gray-dark-4);
42+
--vp-c-text-light-4: var(--vp-c-gray-dark-5);
43+
44+
--vp-c-text-dark-1: var(--vp-c-white);
45+
--vp-c-text-dark-2: var(--vp-c-gray-light-3);
46+
--vp-c-text-dark-3: var(--vp-c-gray-light-4);
47+
--vp-c-text-dark-4: var(--vp-c-gray-light-5);
48+
}
49+
50+
.dark {
51+
--vp-c-brand: #b9f;
52+
}
53+
54+
.custom-block h3:first-of-type {
55+
margin-top: 8px;
56+
}

docs/.vitepress/theme/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import DefaultTheme from "vitepress/theme";
2+
import "./custom.css";
3+
4+
export default DefaultTheme;

docs/404.md

-9
This file was deleted.

docs/Gemfile

-9
This file was deleted.

0 commit comments

Comments
 (0)