Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding docs website #123

Merged
merged 4 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ dmypy.json
# Yarn cache
.yarn/
*.zwc
static/
.ruff_cache
.venv
.venv

# Docusaurus

# Generated files
.docusaurus
.cache-loader

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Ignore Static for non-docs
!docs-website/static/
50 changes: 50 additions & 0 deletions docs-website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

### Markdown Syntax

Docusaurus uses MDX rather than standard markdown, so all "html" style code would need to be written using "jsx" style code instead.


### Typesetting Conventions

* Use [Admonitions](https://docusaurus.io/docs/markdown-features/admonitions) for info, tip, warning, etc. For example, a tip would look like this in Markdown:
```
:::warning

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::
```
* Use opening and closing double quotes “ ” when you want to use quotes.
* “ opening - is Option + [ on Mac
* ” closing - is Option + Shift + [ on Mac.
* Don't use code-style quotes ". Don't use single quotes at all.
* Use code highlighting whenever you're mentioning something that's code, like a `function_name()`.
* Use dashes properly:
* em-dash: — use instead of comma; use sparingly. [Option + Shift + Dash (-) on Mac]
* en-dash: – use for number ranges, 2–3 items. [Option + Dash (-) on Mac]
* hyphen: - use for hyphenation


3 changes: 3 additions & 0 deletions docs-website/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
3 changes: 3 additions & 0 deletions docs-website/docs/getting-started/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Getting Started

Main page for getting started. This can be used as a way to direct users to specific points in getting started portion. May not be necessary if the main workflow is always installation and then the simple tutorial.
7 changes: 7 additions & 0 deletions docs-website/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# Installation

All installation information
7 changes: 7 additions & 0 deletions docs-website/docs/getting-started/simple-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 2
---

# Example Dataset

Should be a walk through of a simple example once the user has installed the application
7 changes: 7 additions & 0 deletions docs-website/docs/how-to-guides/how-to-guide-one.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# First How-To-Guide

Content
7 changes: 7 additions & 0 deletions docs-website/docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# What Is Persist

Discuss Specifics of Persist and overall idea. Do not need to go into details about papers, results, etc. That can be left to the about page.
111 changes: 111 additions & 0 deletions docs-website/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
title: 'Persist',
tagline: '',
favicon: 'img/logos/favicon.svg',

// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},

presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],

themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
// title: 'Persist',
logo: {
alt: 'Persist Logo',
src: 'img/logos/persist-logo-small-light.svg',
srcDark:'img/logos/persist-logo-small-dark.svg',
href:'/'
},
items: [
{to: '/about', label: 'About', position: 'left'},
{to: '/community', label: 'Community', position: 'left'},
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Documentation',
},
{
href: 'https://github.com/visdesignlab/persist',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style:'light',
links: [
{
html:`
<div class="footer-wrapper row">
<a class="col col--3" target="_blank" href="https://vdl.sci.utah.edu/">
<img src="/img/logos/vdl-logo-light.svg" class='logo light-theme-display-component'/>
<img src="/img/logos/vdl-logo-dark.svg" class='logo dark-theme-display-component'/>
</a>
<a class="col col--3" target="_blank" href="https://www.sci.utah.edu/">
<img src="/img/logos/sci-logo-light.svg" class='logo light-theme-display-component'/>
<img src="/img/logos/sci-logo-dark.svg" class='logo dark-theme-display-component'/>
</a>
<a class="col col--3" target="_blank" href="https://www.cs.utah.edu/">
<img src="/img/logos/ULogo-light.svg" class='logo light-theme-display-component'/>
<img src="/img/logos/ULogo-dark.svg" class='logo dark-theme-display-component'/>
</a>
<a class="col col--3" target="_blank" href="https://www.nsf.gov/">
<img src="/img/logos/nsf.png" class='logo'/>
</a>
</div>
`
},
],
copyright: `Copyright © 2022-${new Date().getFullYear()}. The Persist team. Last updated on ${new Date().toISOString().split('T')[0]}. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};

export default config;
50 changes: 50 additions & 0 deletions docs-website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "docs-website",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.3.2",
"@docusaurus/preset-classic": "3.3.2",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.3.2",
"@docusaurus/tsconfig": "3.3.2",
"@docusaurus/types": "3.3.2",
"typescript": "~5.2.2",
"postcss-preset-mantine": "^1.9.0",
"postcss-simple-vars": "^7.0.1",
"postcss": "^8.4.31"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}
46 changes: 46 additions & 0 deletions docs-website/sidebars.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';

/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation

The sidebars can be generated from the filesystem, or explicitly defined here.

Create as many sidebars as you want.
*/
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
// tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],

// But you can create a sidebar manually

tutorialSidebar: [
'intro',
{
type: 'category',
label: 'Getting Started',
link:{
type:'doc',
id: 'getting-started/index'
},
items: [
'getting-started/installation',
'getting-started/simple-tutorial'
],
},
{
type: 'category',
label: 'How-To-Guides',
link:{
type:'generated-index'
},
items: [
'how-to-guides/how-to-guide-one'
],
},
]
};

export default sidebars;
Loading
Loading