Skip to content

Commit

Permalink
New vitepress documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardocavazza committed Jan 11, 2024
1 parent 15e75b0 commit eb98001
Show file tree
Hide file tree
Showing 50 changed files with 1,451 additions and 953 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"**/types/*",
"**/fixture/*",
"**/fixtures/*",
"public",
"docs/.vitepress/dist",
"docs/.vitepress/cache"
]
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Pages
on:
workflow_dispatch:
push:
branches: ['main']

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: yarn

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3

- name: Install project dependencies
run: yarn install

- name: Build Documentation
run: yarn docs:build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: public

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/packages/*/demo
.nyc_output
coverage
public
tsconfig.tsbuildinfo
docs/.vitepress/dist
docs/.vitepress/cache
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ packages/*/dist/*
packages/*/types/*
packages/*/test/fixture/*
packages/*/test/fixtures/*
public
docs/.vitepress/dist
docs/.vitepress/cache
CHANGELOG.md
Expand Down
163 changes: 163 additions & 0 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
import { defineConfig } from 'vitepress';

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'RNA',
description: 'Build tools for modern web modules and applications.',
base: '/rna/',
outDir: '../public',

head: [['link', { rel: 'icon', href: 'https://www.chialab.it/favicon.png' }]],

themeConfig: {
logo: 'https://raw.githubusercontent.com/chialab/rna/main/logo.svg',

editLink: {
pattern: 'https://github.com/chialab/rna/edit/main/docs/:path',
text: 'Suggest changes to this page',
},

// https://vitepress.dev/reference/default-theme-config
nav: [
{
text: 'Home',
link: '/',
},
{
text: 'Guide',
link: '/guide/',
},
{
text: 'Chialab.io',
link: 'https://www.chialab.io',
},
],

sidebar: [
{
text: 'Get started',
link: '/guide/',
},
{
text: 'Architecture',
link: '/guide/architecture',
},
{
text: 'Plugins',
items: [
{
text: 'esbuild-plugin-any-file',
link: '/guide/esbuild-plugin-any-file',
},
{
text: 'esbuild-plugin-babel',
link: '/guide/esbuild-plugin-babel',
},
{
text: 'esbuild-plugin-commonjs',
link: '/guide/esbuild-plugin-commonjs',
},
{
text: 'esbuild-plugin-css-import',
link: '/guide/esbuild-plugin-css-import',
},
{
text: 'esbuild-plugin-env',
link: '/guide/esbuild-plugin-env',
},
{
text: 'esbuild-plugin-html',
link: '/guide/esbuild-plugin-html',
},
{
text: 'esbuild-plugin-meta-url',
link: '/guide/esbuild-plugin-meta-url',
},
{
text: 'esbuild-plugin-metadata',
link: '/guide/esbuild-plugin-metadata',
},
{
text: 'esbuild-plugin-postcss',
link: '/guide/esbuild-plugin-postcss',
},
{
text: 'esbuild-plugin-require-resolve',
link: '/guide/esbuild-plugin-require-resolve',
},
{
text: 'esbuild-plugin-virtual',
link: '/guide/esbuild-plugin-virtual',
},
{
text: 'esbuild-plugin-worker',
link: '/guide/esbuild-plugin-worker',
},
{
text: 'postcss-dart-sass',
link: '/guide/postcss-dart-sass',
},
{
text: 'postcss-url-rebase',
link: '/guide/postcss-url-rebase',
},
// {
// text: 'Write a plugin',
// link: '/guide/write-a-plugin',
// },
],
},
{
text: 'CLI',
items: [
{
text: 'JavaScript modules',
link: '/guide/building-javascript',
},
{
text: 'CSS',
link: '/guide/building-css',
},
{
text: 'Web apps',
link: '/guide/building-web-apps',
},
{
text: 'Dev server',
link: '/guide/dev-server',
},
{
text: 'Testing in the browser',
link: '/guide/testing-browser',
},
{
text: 'Testing in node',
link: '/guide/testing-node',
},
],
},
{
text: 'Tutorials',
items: [
{
text: 'Migrate from CRA',
link: '/guide/migrate-CRA',
},
],
},
],

socialLinks: [
{
icon: 'github',
link: 'https://github.com/chialab/rna',
},
],

footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2023 - Chialab',
},
},
lastUpdated: true,
});
6 changes: 6 additions & 0 deletions docs/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import DefaultTheme from 'vitepress/theme';
import './theme.css';

export default {
extends: DefaultTheme,
};
10 changes: 10 additions & 0 deletions docs/.vitepress/theme/theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
:root {
--vp-c-brand-1: #f07c00;
--vp-c-brand-2: #d56e00;
--vp-button-brand-bg: var(--vp-c-brand-1);
--vp-button-brand-hover-bg: #d56e00;
--vp-button-brand-active-bg: #ce5900;

--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: linear-gradient(to bottom right, #ffac52 0%, #f07c00 100%);
}
38 changes: 0 additions & 38 deletions docs/Plugins.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/Testing-saucelabs.md

This file was deleted.

Loading

0 comments on commit eb98001

Please sign in to comment.