Skip to content

Commit

Permalink
Add docs template and deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
hericmar committed Jun 21, 2023
0 parents commit 6bc39ad
Show file tree
Hide file tree
Showing 11 changed files with 239 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy to GitHub Pages

permissions:
contents: write

on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./Website
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci
- name: Build website
run: npm run docs:build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./Docs/.vitepress/dist
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
dist/
.vitepress/cache/
package-lock.json
28 changes: 28 additions & 0 deletions Docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defineConfig } from 'vitepress'
import { generateSidebar } from "vitepress-sidebar";


// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "I3T",
description: "I3T",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
// { text: 'Examples', link: '/markdown-examples' }
],

sidebar: generateSidebar({
documentRootPath: "Docs",
collapsed: true,
collapseDepth: 2,
useTitleFromFrontmatter: true,
underscoreToSpace: true,
}),

socialLinks: [
{ icon: 'github', link: 'https://github.com/i3t-tool/i3t' }
]
},
})
16 changes: 16 additions & 0 deletions Docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import Theme from 'vitepress/theme'
import './style.css'

export default {
...Theme,
Layout: () => {
return h(Theme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
// ...
}
}
91 changes: 91 additions & 0 deletions Docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/**
* Customize default theme styling by overriding CSS variables:
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/

/**
* Colors
* -------------------------------------------------------------------------- */

:root {
--vp-c-brand: #646cff;
--vp-c-brand-light: #747bff;
--vp-c-brand-lighter: #9499ff;
--vp-c-brand-lightest: #bcc0ff;
--vp-c-brand-dark: #535bf2;
--vp-c-brand-darker: #454ce1;
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
}

/**
* Component: Button
* -------------------------------------------------------------------------- */

:root {
--vp-button-brand-border: var(--vp-c-brand-light);
--vp-button-brand-text: var(--vp-c-white);
--vp-button-brand-bg: var(--vp-c-brand);
--vp-button-brand-hover-border: var(--vp-c-brand-light);
--vp-button-brand-hover-text: var(--vp-c-white);
--vp-button-brand-hover-bg: var(--vp-c-brand-light);
--vp-button-brand-active-border: var(--vp-c-brand-light);
--vp-button-brand-active-text: var(--vp-c-white);
--vp-button-brand-active-bg: var(--vp-button-brand-bg);
}

/**
* Component: Home
* -------------------------------------------------------------------------- */

:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#bd34fe 30%,
#41d1ff
);

--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#bd34fe 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(40px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(72px);
}
}

/**
* Component: Custom Block
* -------------------------------------------------------------------------- */

:root {
--vp-custom-block-tip-border: var(--vp-c-brand);
--vp-custom-block-tip-text: var(--vp-c-brand-darker);
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
}

.dark {
--vp-custom-block-tip-border: var(--vp-c-brand);
--vp-custom-block-tip-text: var(--vp-c-brand-lightest);
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
}

/**
* Component: Algolia
* -------------------------------------------------------------------------- */

.DocSearch {
--docsearch-primary-color: var(--vp-c-brand) !important;
}

5 changes: 5 additions & 0 deletions Docs/Getting_Started/About.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: About I3T
---

# About I3T
5 changes: 5 additions & 0 deletions Docs/Getting_Started/Installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Installation
---

# Installation
5 changes: 5 additions & 0 deletions Docs/Manual/NewTutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Writing a New Tutorial
---

# Writing a New Tutorial
23 changes: 23 additions & 0 deletions Docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home

hero:
name: "I3T"
tagline: An Interactive Tool for Teaching Transformations
actions:
- theme: brand
text: Manual
link: /Getting_Started/About.html
# - theme: alt
# text: API Examples
# link: /api-examples

features:
# - title: Feature A
# details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
# - title: Feature B
# details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
# - title: Feature C
# details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
---
1 change: 1 addition & 0 deletions Website
Submodule Website added at aac689
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "module",
"name": "i3t-website",
"scripts": {
"docs:dev": "vitepress dev Docs",
"docs:build": "vitepress build Docs",
"docs:preview": "vitepress preview ."
},
"devDependencies": {
"@types/node": "^20.3.1",
"vite": "^4.3.8",
"vitepress": "^1.0.0-beta.2",
"vitepress-sidebar": "^1.8.1"
}
}

0 comments on commit 6bc39ad

Please sign in to comment.