-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: setup VitePress for documentation (#67)
remove orama, update title, use readme as root documentation page fix build refactor: customize settings & nav chore: customize theme & refactor sidebar chore: continue to rework theme & docs chore: continue docs & vitepress cleanup
- Loading branch information
1 parent
dcc6885
commit 5be9c90
Showing
79 changed files
with
5,217 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "@nodesecure/eslint-config", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"requireConfigFile": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Sample workflow for building and deploying a VitePress site to GitHub Pages | ||
# | ||
name: Deploy VitePress site to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the `main` branch. Change this to `master` if you're | ||
# using the `master` branch as the default branch. | ||
push: | ||
branches: [main] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
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 job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
with: | ||
fetch-depth: 0 # Not needed if lastUpdated is not enabled | ||
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm | ||
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun | ||
- name: Setup Node | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: 20 | ||
cache: npm # or pnpm / yarn | ||
- name: Setup Pages | ||
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0 | ||
- name: Install dependencies | ||
run: npm ci # or pnpm install / yarn install / bun install | ||
- name: Build with VitePress | ||
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | ||
with: | ||
path: docs/.vitepress/dist | ||
|
||
# Deployment job | ||
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@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { defineConfig } from "vitepress" | ||
import sidebar from "./sidebar" | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "API Partenaire", | ||
description: "Documentation technique", | ||
lang: "fr-FR", | ||
lastUpdated: true, | ||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
outlineTitle: "Table des matières", | ||
nav: [ | ||
{ | ||
text: "🏠 Accueil", | ||
link: "/" | ||
}, | ||
{ | ||
text: "📚 Documentation", | ||
link: "/documentation", | ||
activeMatch: "^((?:\/(?!MAD)).+)$" | ||
}, | ||
{ | ||
text: "⚡ MAD", | ||
link: "/MAD/introduction.md", | ||
activeMatch: "/MAD/" | ||
}, | ||
{ text: "Postman", link: "https://docs.api.myunisoft.fr/" }, | ||
], | ||
sidebar, | ||
search: { | ||
provider: "local" | ||
}, | ||
socialLinks: [ | ||
{ icon: "github", link: "https://github.com/MyUnisoft/" }, | ||
{ icon: "linkedin", link: "https://www.linkedin.com/company/myunisoft" } | ||
], | ||
logo: { | ||
light: "https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/e4951fd8010295ee229518551a558e0d74e9faf4c6ba3000b65cc04fad62789a", | ||
dark: "/images/logo/white.svg" | ||
}, | ||
editLink: { | ||
pattern: "https://github.com/MyUnisoft/api-partenaires/edit/main/docs/:path" | ||
} | ||
}, | ||
markdown: { | ||
theme: { | ||
light: "github-light-default", | ||
dark: "monokai" | ||
} | ||
}, | ||
base: "/", | ||
vite: { | ||
assetsInclude: ["**/*.PNG"] | ||
}, | ||
}) |
Oops, something went wrong.