Skip to content

Commit

Permalink
docs(website): migrate to vitepress
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Sep 14, 2023
1 parent ea5bbcf commit e8a8acf
Show file tree
Hide file tree
Showing 152 changed files with 1,754 additions and 11,783 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/website.yml

This file was deleted.

23 changes: 0 additions & 23 deletions docs/config.js

This file was deleted.

Binary file removed docs/content/icon/favicon-160x160.png
Binary file not shown.
Binary file removed docs/content/icon/favicon-16x16.png
Binary file not shown.
Binary file removed docs/content/icon/favicon-192x192.png
Binary file not shown.
Binary file removed docs/content/icon/favicon-196x196.png
Binary file not shown.
Binary file removed docs/content/icon/favicon-32x32.png
Binary file not shown.
Binary file removed docs/content/icon/favicon-96x96.png
Binary file not shown.
235 changes: 0 additions & 235 deletions docs/content/index.pug

This file was deleted.

Binary file removed docs/content/logo.png
Binary file not shown.
5 changes: 0 additions & 5 deletions docs/data/menu.yml

This file was deleted.

47 changes: 0 additions & 47 deletions docs/themes/navy/layout/partial/footer.swig

This file was deleted.

53 changes: 0 additions & 53 deletions docs/tpl/__en__

This file was deleted.

32 changes: 0 additions & 32 deletions docs/tpl/__sidebar__

This file was deleted.

1 change: 1 addition & 0 deletions docs/vitepress/.vitepress/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cache
115 changes: 115 additions & 0 deletions docs/vitepress/.vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: "trame",
title: "trame",
description: "Trame lets you weave various components and technologies into a Web Application solely written in Python",
lastUpdated: true,
head: [
[
'script',
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-H4W9XHTJ7X' }
],
[
'script',
{},
`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-H4W9XHTJ7X');`
]
],
themeConfig: {
search: {
provider: 'local'
},
logo: '/logo-title.svg',
siteTitle: false,
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/docs/' },
{ text: 'Examples', link: '/examples/' },
{
text: 'Resources',
items: [
{ text: 'API', link: 'https://trame.readthedocs.io/en/latest/index.html' },
{ text: 'Discussions', link: 'https://github.com/Kitware/trame/discussions' },
{ text: 'Bugs', link: 'https://github.com/Kitware/trame/issues' },
{ text: 'Contact Us', link: 'https://www.kitware.com/contact-us/' },
]
}
],

sidebar: {
'/docs/':[
{
text: 'Getting Started',
items: [
{ text: 'Introduction', link: '/docs/' },
{ text: 'How to start', link: '/docs/getting_started' },
{ text: 'API', link: '/docs/api' },
{ text: 'Cheatsheet', link: '/docs/cheatsheet' },
{ text: 'Course', link: '/docs/course_intro' },
{ text: 'Vue 2/3 client', link: '/docs/vue23' },
]
},
{
text: 'Roadmap',
items: [
{ text: 'Introduction', link: '/docs/trame_roadmap_intro' },
{ text: 'From 1 to 2', link: '/docs/trame_v1-2' },
{ text: 'From 2 to 3', link: '/docs/trame_v2-3' },
]
},
{
text: 'Tutorial',
items: [
{ text: 'Overview', link: '/docs/tutorial' },
{ text: 'Download', link: '/docs/tutorial-download' },
{ text: 'Setup for VTK', link: '/docs/tutorial-setup-vtk' },
{ text: 'VTK', link: '/docs/tutorial-vtk' },
{ text: 'Layouts', link: '/docs/tutorial-layouts' },
{ text: 'HTML', link: '/docs/tutorial-html' },
{ text: 'Application', link: '/docs/tutorial-application' },
{ text: 'ParaView', link: '/docs/tutorial-paraview' },
]
},
{
text: 'Deployment',
items: [
{ text: 'Python CLI', link: '/docs/deploy-pypi' },
{ text: 'Jupyter', link: '/docs/deploy-jupyter' },
{ text: 'Desktop', link: '/docs/deploy-desktop' },
{ text: 'Cloud', link: '/docs/deploy-cloud' },
{ text: 'HPC / Clusters', link: '/docs/deploy-hpc' },
{ text: 'NGINX', link: '/docs/deploy-nginx' },
]
},
],
'/examples/':[
{
text: 'Basic',
items: [
{ text: 'Listing', link: '/examples/' },
{ text: 'Files', link: '/examples/files' },
{ text: 'Desktop', link: '/docs/deploy-desktop' },
{ text: 'Cloud', link: '/docs/deploy-cloud' },
{ text: 'HPC / Clusters', link: '/docs/deploy-hpc' },
{ text: 'NGINX', link: '/docs/deploy-nginx' },
]
},
],
},

socialLinks: [
{ icon: 'github', link: 'https://github.com/kitware/trame' }
],

footer: {
message: 'Released under the Apache 2 License.',
copyright: 'Copyright © 2021-present Kitware Inc.'
}
},
})
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
13 changes: 13 additions & 0 deletions docs/vitepress/examples/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
| ![Alt text](images/CarotidFlow.jpg) | ![Alt text](images/ConceptualModeler.jpg) | ![Alt text](images/ZarrContourViewer.jpg) |
| :-------------------------------------------: | :-------------------------------------------: | :-------------------------------------------: |
| ![Alt text](images/FiniteElementAnalysis.jpg) | ![Alt text](images/ContourGeometry.jpg) | ![Alt text](images/MappingDemo.jpg) |
| ![Alt text](images/Markdown.jpg) | ![Alt text](images/MatplotlibScatterPlot.jpg) | ![Alt text](images/MatplotlibSubPolts.jpg) |
| ![Alt text](images/mstar.jpg) | ![Alt text](images/MultiFilter.jpg) | ![Alt text](images/PlotlyContour.jpg) |
| ![Alt text](images/PlotlyMulti.jpg) | ![Alt text](images/PlotlyScatterPlot.jpg) | ![Alt text](images/pv_visualizer.jpg) |
| ![Alt text](images/pvSimpleCone-Remote.jpg) | ![Alt text](images/PVStateViewer-diskout.jpg) | ![Alt text](images/RemoteSelection.jpg) |
| ![Alt text](images/ScatterMatrix.jpg) | ![Alt text](images/SimpleCone.jpg) | ![Alt text](images/SimpleRayCast.jpg) |
| ![Alt text](images/Simput.jpg) | ![Alt text](images/StateViewer-asteroid.jpg) | ![Alt text](images/StateViewer-diskout.jpg) |
| ![Alt text](images/StateViewer-medical.jpg) | ![Alt text](images/StateViewer-rock.jpg) | ![Alt text](images/StreamGraph.jpg) |
| ![Alt text](images/SurfacePicking-hover.jpg) | ![Alt text](images/SurfacePicking-select.jpg) | ![Alt text](images/Table.jpg) |
| ![Alt text](images/trame-mnist.jpg) | ![Alt text](images/UberPickupsNYC.jpg) | ![Alt text](images/USIncomeByState.jpg) |
| ![Alt text](images/VTPViewer-earth.jpg) | ![Alt text](images/VTPViewer-singlepin.jpg) | ![Alt text](images/xaitk.jpg) |
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/content/docs/api.md → docs/vitepress/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

We use [Read The Docs](https://trame.readthedocs.io/en/latest/) to host our autogenerated API documentation. You can click on the image below to open the API documentation on RTD.

[![Read the docs Website](/trame/images/readthedocs.png)](https://trame.readthedocs.io/en/latest/index.html)
[![Read the docs Website](/images/api.png)](https://trame.readthedocs.io/en/latest/index.html)
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ server.start()
## Results


<p style="text-align:center;display: flex;align-items: center;">
<img src="/trame/images/trame-cheatsheet-app.jpg" alt="Application" style="width: 45%; height: 45%">
<img src="/trame/images/trame-cheatsheet-output.jpg" alt="Output" style="width: 45%; height: 45%">
</p>
| ![GUI](/images/trame-cheatsheet-app.jpg){ width=60% } | ![Terminal](/images/trame-cheatsheet-output.jpg) |
| :---: | :---: |


## Explanatory Details

Expand Down Expand Up @@ -121,6 +120,7 @@ Methods can be passed to the events attribute of your UI elements. By default, t
If you want to control its arguments you can use a tuple where the second entry represents the __args__ and the third represents the __kwargs__. If you only want to provide args without kwargs, just provide a tuple with 2 entries. __$event__ is a reserved name to represent the event object.

```python
vuetify.VBtn("Click me", click="a = $event"))
vuetify.VBtn("Click me", click=ctrl.do_something))
vuetify.VBtn("Click me", click=(ctrl.do_something, "['hello', $event]"))
vuetify.VBtn("Click me", click=(ctrl.do_something, "[index, $event]", "{ a: 12 }"))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import time
async def update_time():
while True:
await asyncio.sleep(1)
with state:
with state: # needed because of async
state.time = time.time()
```

Expand Down
Loading

0 comments on commit e8a8acf

Please sign in to comment.