Skip to content

Commit

Permalink
Add vitepress
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-vdv committed May 31, 2023
1 parent 86bf8fa commit 2e4ab88
Show file tree
Hide file tree
Showing 13 changed files with 1,072 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false

[*.yml]
indent_size = 2

[*.json]
indent_size = 2
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and Deploy to Pages
on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Setup Pages
uses: actions/configure-pages@v3
- name: install dependencies
run: npm ci
- name: Build site
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/.vitepress/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ dist
.cache

# vitepress build and cache directories
.vitepress/dist
.vitepress/cache
docs/.vitepress/dist
docs/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
61 changes: 61 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { defineConfig } from 'vitepress';

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'TrainLink Connect',
description: 'The documentation for TrainLink Connect',
base: '/trainlink-connect/',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'TrainLink', link: 'https://trainlink-org.github.io' },
{
text: 'TrainLink Command',
link: 'https://trainlink-org.github.io/trainlink-command',
},
],

sidebar: [
{
text: 'The Basics',
items: [
{
text: 'Introduction',
link: '/',
},
{
text: 'How it works',
link: '/how-it-works',
},
{
text: 'Making a connection',
link: '/making-connection',
},
],
},
{
text: 'API reference',
items: [
{
text: 'Server to client',
link: '/server-client',
},
{
text: 'Client to server',
link: '/client-server',
},
],
},
],

socialLinks: [
{
icon: 'github',
link: 'https://github.com/trainlink-org/trainlink-connect',
},
],
search: {
provider: 'local',
},
},
});
1 change: 1 addition & 0 deletions docs/client-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Client to Server messages
1 change: 1 addition & 0 deletions docs/how-it-works.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# How it works
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Introduction

TrainLink Connect is the underlying communication system that powers TrainLink Command. If you are looking to download Trainlink Command, go [here](https://trainlink-org.github.io).
1 change: 1 addition & 0 deletions docs/making-connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Making a connection
1 change: 1 addition & 0 deletions docs/server-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Server to Client messages
Loading

0 comments on commit 2e4ab88

Please sign in to comment.