From 6e6009aebd1eb5b32cddb3aa49c946d748287fdc Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:53:52 +0100 Subject: [PATCH] docs: build the user documentation with Docusaurus (#264) Initiate the website with Docusaurus v3. Setup the site and includes the content that was already available in the `docs` package. The currently implementation mainly uses the default theme available when using the Docusaurus scaffolding. It was initiated with: `npx create-docusaurus@3.0.0 my-website classic` --- .github/workflows/build.yml | 4 +- ...documentation.yml => generate-website.yml} | 16 +- .gitignore | 2 +- README.md | 12 +- .../docs => docs}/images/maxgraph_demo.gif | Bin packages/core/tsconfig.json | 2 +- packages/docs/.gitignore | 1 - packages/website/.gitignore | 2 + packages/website/README.md | 43 +++++ packages/website/babel.config.js | 3 + .../website/docs/development/_category_.json | 8 + .../docs/development}/release.md | 10 +- packages/website/docs/intro.md | 36 ++++ packages/website/docs/usage/_category_.json | 8 + .../docs/usage}/css-and-images.md | 6 +- .../docs/usage}/migrate-from-mxgraph.md | 25 ++- packages/website/docusaurus.config.ts | 136 ++++++++++++++ .../old-mxgraph/api-specification.txt | 0 .../old-mxgraph/css/manual-colors.css | 0 .../old-mxgraph/css/manual-styles.css | 0 .../images/MX_MANUAL_html_1cc55dd3.png | Bin .../images/MX_MANUAL_html_ba4bf13.png | Bin .../images/MX_MANUAL_html_m75de608.png | Bin .../old-mxgraph/images/architecture.png | Bin .../old-mxgraph/images/callgraph.png | Bin .../old-mxgraph/images/editor.png | Bin .../old-mxgraph/images/graph.png | Bin .../old-mxgraph/images/logo.jpg | Bin .../old-mxgraph/images/model.png | Bin .../images/mx_man_architecture.png | Bin .../images/mx_man_collapse_swim.png | Bin .../old-mxgraph/images/mx_man_drill_down.png | Bin .../old-mxgraph/images/mx_man_drilling.png | Bin .../images/mx_man_edge_routing.png | Bin .../old-mxgraph/images/mx_man_expand_swim.png | Bin .../images/mx_man_graph_analysis.jpg | Bin .../images/mx_man_graph_interaction.png | Bin .../images/mx_man_graph_layout.png | Bin .../old-mxgraph/images/mx_man_graph_vis.png | Bin .../images/mx_man_hello_struct.png | Bin .../old-mxgraph/images/mx_man_hello_world.png | Bin .../images/mx_man_log_group_struct.png | Bin .../images/mx_man_non_realtive_edge_pos.png | Bin .../images/mx_man_non_relative_pos.png | Bin .../old-mxgraph/images/mx_man_overlap.png | Bin .../images/mx_man_rel_vert_pos.png | Bin .../images/mx_man_simple_graph.png | Bin .../images/mx_man_simple_workflow.png | Bin .../images/mx_man_stencil_loaded.png | Bin .../old-mxgraph/images/mx_man_styles.png | Bin .../old-mxgraph/images/mx_man_top_level.png | Bin .../images/mx_man_vertex_props.png | Bin .../old-mxgraph/images/mxgraph_logo.gif | Bin .../{docs => website}/old-mxgraph/js/toc.js | 0 .../old-mxgraph/known-issues.html | 0 .../{docs => website}/old-mxgraph/manual.html | 2 +- .../old-mxgraph/manual_javavis.html | 2 +- .../old-mxgraph/stencils.xsd | 0 .../old-mxgraph/tutorial.html | 0 packages/website/package.json | 46 +++++ packages/website/sidebars.ts | 31 ++++ .../src/components/HomepageFeatures/index.tsx | 73 ++++++++ .../HomepageFeatures/styles.module.css | 11 ++ packages/website/src/css/custom.css | 30 +++ packages/website/src/pages/index.module.css | 23 +++ packages/website/src/pages/index.tsx | 42 +++++ packages/website/src/pages/markdown-page.md | 7 + packages/website/static/.nojekyll | 0 packages/website/static/img/docusaurus.png | Bin 0 -> 5142 bytes packages/website/static/img/favicon.ico | Bin 0 -> 3626 bytes packages/website/static/img/logo.svg | 1 + .../static/img/undraw_docusaurus_mountain.svg | 171 ++++++++++++++++++ .../static/img/undraw_docusaurus_react.svg | 170 +++++++++++++++++ .../static/img/undraw_docusaurus_tree.svg | 40 ++++ packages/website/tsconfig.json | 7 + 75 files changed, 942 insertions(+), 28 deletions(-) rename .github/workflows/{generate-documentation.yml => generate-website.yml} (54%) rename {packages/docs => docs}/images/maxgraph_demo.gif (100%) delete mode 100644 packages/docs/.gitignore create mode 100644 packages/website/.gitignore create mode 100644 packages/website/README.md create mode 100644 packages/website/babel.config.js create mode 100644 packages/website/docs/development/_category_.json rename packages/{docs => website/docs/development}/release.md (91%) create mode 100644 packages/website/docs/intro.md create mode 100644 packages/website/docs/usage/_category_.json rename packages/{docs => website/docs/usage}/css-and-images.md (86%) rename packages/{docs => website/docs/usage}/migrate-from-mxgraph.md (95%) create mode 100644 packages/website/docusaurus.config.ts rename packages/{docs => website}/old-mxgraph/api-specification.txt (100%) rename packages/{docs => website}/old-mxgraph/css/manual-colors.css (100%) rename packages/{docs => website}/old-mxgraph/css/manual-styles.css (100%) rename packages/{docs => website}/old-mxgraph/images/MX_MANUAL_html_1cc55dd3.png (100%) rename packages/{docs => website}/old-mxgraph/images/MX_MANUAL_html_ba4bf13.png (100%) rename packages/{docs => website}/old-mxgraph/images/MX_MANUAL_html_m75de608.png (100%) rename packages/{docs => website}/old-mxgraph/images/architecture.png (100%) rename packages/{docs => website}/old-mxgraph/images/callgraph.png (100%) rename packages/{docs => website}/old-mxgraph/images/editor.png (100%) rename packages/{docs => website}/old-mxgraph/images/graph.png (100%) rename packages/{docs => website}/old-mxgraph/images/logo.jpg (100%) rename packages/{docs => website}/old-mxgraph/images/model.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_architecture.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_collapse_swim.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_drill_down.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_drilling.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_edge_routing.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_expand_swim.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_graph_analysis.jpg (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_graph_interaction.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_graph_layout.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_graph_vis.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_hello_struct.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_hello_world.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_log_group_struct.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_non_realtive_edge_pos.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_non_relative_pos.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_overlap.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_rel_vert_pos.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_simple_graph.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_simple_workflow.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_stencil_loaded.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_styles.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_top_level.png (100%) rename packages/{docs => website}/old-mxgraph/images/mx_man_vertex_props.png (100%) rename packages/{docs => website}/old-mxgraph/images/mxgraph_logo.gif (100%) rename packages/{docs => website}/old-mxgraph/js/toc.js (100%) rename packages/{docs => website}/old-mxgraph/known-issues.html (100%) rename packages/{docs => website}/old-mxgraph/manual.html (99%) rename packages/{docs => website}/old-mxgraph/manual_javavis.html (99%) rename packages/{docs => website}/old-mxgraph/stencils.xsd (100%) rename packages/{docs => website}/old-mxgraph/tutorial.html (100%) create mode 100644 packages/website/package.json create mode 100644 packages/website/sidebars.ts create mode 100644 packages/website/src/components/HomepageFeatures/index.tsx create mode 100644 packages/website/src/components/HomepageFeatures/styles.module.css create mode 100644 packages/website/src/css/custom.css create mode 100644 packages/website/src/pages/index.module.css create mode 100644 packages/website/src/pages/index.tsx create mode 100644 packages/website/src/pages/markdown-page.md create mode 100644 packages/website/static/.nojekyll create mode 100644 packages/website/static/img/docusaurus.png create mode 100644 packages/website/static/img/favicon.ico create mode 100644 packages/website/static/img/logo.svg create mode 100644 packages/website/static/img/undraw_docusaurus_mountain.svg create mode 100644 packages/website/static/img/undraw_docusaurus_react.svg create mode 100644 packages/website/static/img/undraw_docusaurus_tree.svg create mode 100644 packages/website/tsconfig.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c98459f1..c1979da0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: - '.nvmrc' - 'packages/**/*' - '!packages/**/*.md' - - '!packages/docs/*' + - '!packages/website/**/*' - 'scripts/**/*' - 'babel.config.js' - 'package.json' @@ -21,7 +21,7 @@ on: - '.github/workflows/build.yml' - 'packages/**/*' - '!packages/**/*.md' - - '!packages/docs/*' + - '!packages/website/**/*' - 'scripts/**/*' - 'babel.config.js' - 'package.json' diff --git a/.github/workflows/generate-documentation.yml b/.github/workflows/generate-website.yml similarity index 54% rename from .github/workflows/generate-documentation.yml rename to .github/workflows/generate-website.yml index 595873ba4..5b8941127 100644 --- a/.github/workflows/generate-documentation.yml +++ b/.github/workflows/generate-website.yml @@ -1,14 +1,14 @@ -name: Generate documentation +name: Generate website on: pull_request: branches: - development paths: - - '.github/workflows/generate-documentation.yml' + - '.github/workflows/generate-website.yml' - '.nvmrc' - 'packages/core/*' - - 'packages/docs/*' + - 'packages/website/*' - 'package.json' jobs: @@ -25,3 +25,13 @@ jobs: - name: Build @maxgraph/core API docs working-directory: packages/core run: npm run docs:api + - name: Build website + working-directory: packages/website + run: npm run build + - name: Upload website artifact + uses: actions/upload-artifact@v3 + with: + name: website-${{github.sha}} + path: | + packages/core/build/api/ + packages/website/build/ diff --git a/.gitignore b/.gitignore index 7fd96f7f4..59cd9e288 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,7 @@ package-lock.json /out/ # production -/build +build/ # misc .DS_Store diff --git a/README.md b/README.md index 7af8c9865..f3096b9f6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![npm version](https://img.shields.io/npm/v/@maxgraph/core?color=blue&style=flat)](https://www.npmjs.com/package/@maxgraph/core) [![build status](https://github.com/maxGraph/maxGraph/workflows/Build/badge.svg)](https://github.com/maxGraph/maxGraph/actions/workflows/build.yml) - + `maxGraph` is a TypeScript library which can display and allow interaction with vector diagrams. At a high level, it provides: - **Nodes**, also known as **vertices** which are typically represented by shapes like rectangles. - **Edges** which can be lines and arrows which normally point between one node and another. @@ -12,7 +12,7 @@ It provides many of the diagramming features which would be expected by a piece or LibreOffice® Impress such as being able to resize, move or rotate nodes, but has a stronger focus on automatic layout algorithms and applications of [Graph Theory](https://en.wikipedia.org/wiki/Graph_theory). It is suited towards software which requires finer-grained customization of functionality than off-the-shelf packages. - + The `maxGraph` library uses no third-party software, it requires no plugins and can be integrated in virtually any framework (it's vanilla JS). @@ -107,11 +107,11 @@ graph.batchUpdate(() => { You will see something like in the following _maxGraph panning_ demo: -![maxGraph panning demo](packages/docs/images/maxgraph_demo.gif "maxGraph panning demo") +![maxGraph panning demo](docs/images/maxgraph_demo.gif "maxGraph panning demo") For more details, have a look at the [storybook stories](packages/html/stories). -Notice that some elements produced by `maxGraph` require to use [CSS and images](./packages/docs/css-and-images.md) provided in the npm package. +Notice that some elements produced by `maxGraph` require to use [CSS and images](packages/website/docs/usage/css-and-images.md) provided in the npm package. ## TypeScript support @@ -134,7 +134,7 @@ Until we provide a complete documentation, you can check the mxGraph resources `maxGraph` APIs are not fully compatible with `mxGraph` APIs. The concepts are the same, so experienced `mxGraph` users should be able to switch from `mxGraph` to `maxGraph` without issues. -For a complete guide, see the [dedicated migration page](packages/docs/migrate-from-mxgraph.md). +For a complete guide, see the [dedicated migration page](packages/website/docs/usage/migrate-from-mxgraph.md). ## History @@ -225,4 +225,4 @@ Examples of use can be found in the [maxgraph-integration-examples](https://gith ### Release -See the dedicated [release](packages/docs/release.md) page. +See the dedicated [release](packages/website/docs/development/release.md) page. diff --git a/packages/docs/images/maxgraph_demo.gif b/docs/images/maxgraph_demo.gif similarity index 100% rename from packages/docs/images/maxgraph_demo.gif rename to docs/images/maxgraph_demo.gif diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index bcdcca5fb..dc87f39b0 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -13,7 +13,7 @@ }, "include": ["src/**/*.ts"], "typedocOptions": { - "out": "../docs/build/api", + "out": "build/api", "readme": "none", "excludeExternals": true, "excludePrivate": true diff --git a/packages/docs/.gitignore b/packages/docs/.gitignore deleted file mode 100644 index 567609b12..000000000 --- a/packages/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build/ diff --git a/packages/website/.gitignore b/packages/website/.gitignore new file mode 100644 index 000000000..84ba12e04 --- /dev/null +++ b/packages/website/.gitignore @@ -0,0 +1,2 @@ +.docusaurus/ +build/ diff --git a/packages/website/README.md b/packages/website/README.md new file mode 100644 index 000000000..5e5cd1f90 --- /dev/null +++ b/packages/website/README.md @@ -0,0 +1,43 @@ +# Website + +This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator. + +### Installation + +``` +$ npm install +``` + +### Local Development + +``` +$ npm 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 + +``` +$ npm build +``` + +This command generates static content into the `build` directory and can be served using any static contents hosting service. + + diff --git a/packages/website/babel.config.js b/packages/website/babel.config.js new file mode 100644 index 000000000..e00595dae --- /dev/null +++ b/packages/website/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: [require.resolve('@docusaurus/core/lib/babel/preset')], +}; diff --git a/packages/website/docs/development/_category_.json b/packages/website/docs/development/_category_.json new file mode 100644 index 000000000..a539abff7 --- /dev/null +++ b/packages/website/docs/development/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Development", + "position": 3, + "link": { + "type": "generated-index", + "description": "Everything you need to know when you are developing maxGraph." + } +} diff --git a/packages/docs/release.md b/packages/website/docs/development/release.md similarity index 91% rename from packages/docs/release.md rename to packages/website/docs/development/release.md index 5790dfb0f..34d639618 100644 --- a/packages/docs/release.md +++ b/packages/website/docs/development/release.md @@ -1,3 +1,7 @@ +--- +description: Explain how to do a release of maxGraph. +--- + # Release how-to This page explains the steps needed to release a new version of maxgraph@core. @@ -21,8 +25,8 @@ released. Rename it if necessary. - Close the milestone. Changes in the source code -- Update the version in [package.json](../core/package.json) and the `VERSION` constant in the [Client](../core/src/Client.ts) file. -- Update the [CHANGELOG](../../CHANGELOG.md) to list the major changes included in the new version. Be generic and add a +- Update the version in `packages/core/package.json` and the `VERSION` constant in the `packages/core/src/Client.ts` file. +- Update the `CHANGELOG` file to list the major changes included in the new version. Be generic and add a link to the future GitHub release that will contain detailed release notes, as shown below. ```markdown For more details, see the [0.1.0 Changelog](https://github.com/maxGraph/maxGraph/releases/tag/v0.1.0) on @@ -59,7 +63,7 @@ Create a [new draft release](https://github.com/maxGraph/maxGraph/releases/) - save it as a draft Generate the list of the major changes by using the [automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes). -It is based on the labels of the merged Pull Requests included in this release and the [GitHub release configuration](../../.github/release.yml). +It is based on the labels of the merged Pull Requests included in this release and the [GitHub release configuration](https://github.com/maxGraph/maxGraph/blob/development/.github/release.yml). If the list is incorrect (for example, an item is not in the correct category), update the label(s) or the associated Pull Request and regenerate the list. diff --git a/packages/website/docs/intro.md b/packages/website/docs/intro.md new file mode 100644 index 000000000..6f7796271 --- /dev/null +++ b/packages/website/docs/intro.md @@ -0,0 +1,36 @@ +--- +sidebar_position: 1 +--- + +# Introduction + + +`maxGraph` is a TypeScript library which can display and allow interaction with vector diagrams. At a high level, it provides: +- **Nodes**, also known as **vertices** which are typically represented by shapes like rectangles. +- **Edges** which can be lines and arrows which normally point between one node and another. + +It provides many of the diagramming features which would be expected by a piece of presentation software like Microsoft® PowerPoint™ +or LibreOffice® Impress such as being able to resize, move or rotate nodes, but has a stronger focus on automatic layout +algorithms and applications of [Graph Theory](https://en.wikipedia.org/wiki/Graph_theory). It is suited towards software +which requires finer-grained customization of functionality than off-the-shelf packages. + + +## About this documentation + +:::warning + +This documentation is a **work in progress**. Please be patient, the content will be updated progressively. + +::: + + +## Getting Started + +Please check the maxGraph repository **README**: +- [installation](https://github.com/maxGraph/maxGraph/blob/development/README.md#install) +- [getting started](https://github.com/maxGraph/maxGraph/blob/development/README.md#getting-started) + + +## Usage + +Let's continue with the [Usage](/docs/category/usage) documentation. diff --git a/packages/website/docs/usage/_category_.json b/packages/website/docs/usage/_category_.json new file mode 100644 index 000000000..95126787b --- /dev/null +++ b/packages/website/docs/usage/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Usage", + "position": 2, + "link": { + "type": "generated-index", + "description": "Everything you need to know to use maxGraph." + } +} diff --git a/packages/docs/css-and-images.md b/packages/website/docs/usage/css-and-images.md similarity index 86% rename from packages/docs/css-and-images.md rename to packages/website/docs/usage/css-and-images.md index ae8edc392..b06f31bb5 100644 --- a/packages/docs/css-and-images.md +++ b/packages/website/docs/usage/css-and-images.md @@ -1,9 +1,13 @@ +--- +description: Integrate CSS and Images assets required by maxGraph. +--- + # CSS and Images ## CSS Some features of `maxGraph` create elements in the DOM to let interact with the `Graph`. -For instance, it happens hen using _Rubberband_, _Tooltip_, _MaxWindow_, _Editor_ and _Toolbar_. +For instance, it happens when using _Rubberband_, _Tooltip_, _MaxWindow_, _Editor_ and _Toolbar_. These elements require the application to provide CSS rules for correct display. diff --git a/packages/docs/migrate-from-mxgraph.md b/packages/website/docs/usage/migrate-from-mxgraph.md similarity index 95% rename from packages/docs/migrate-from-mxgraph.md rename to packages/website/docs/usage/migrate-from-mxgraph.md index 25bf21a16..b5dbf28e2 100644 --- a/packages/docs/migrate-from-mxgraph.md +++ b/packages/website/docs/usage/migrate-from-mxgraph.md @@ -9,9 +9,16 @@ Here's a breakdown of the proposed changes: 2. [General guidelines](#general-guidelines) 3. [Specific code changes](#specific-code-changes) -> **Note:** **⚠️⚠️⚠️ This page is under construction. ⚠️⚠️⚠️ +:::warning + +**This page is under construction.** + Comments are welcome by creating an [issue](https://github.com/maxGraph/maxGraph/issues) -or starting a [discussion](https://github.com/maxGraph/maxGraph/discussions/categories/q-a)!**. +or starting a [discussion](https://github.com/maxGraph/maxGraph/discussions/categories/q-a)!. + +Feel free to create a [Pull Request](https://github.com/maxGraph/maxGraph/pulls) to enrich the content or fix errors. + +::: The `maxGraph` APIs are not fully compatible with the `mxGraph` APIs, but the `maxGraph` APIs are close to the former `mxGraph` APIs. The concepts are the same, so experienced `mxGraph` users should be able to switch from `mxGraph` to `maxGraph` without problems. @@ -292,9 +299,9 @@ Several functions from the `mxGraphDataModel` class have been moved to the `Cell ### Misc -Codec renaming and output: https://github.com/maxGraph/maxGraph/pull/70 +- Codec renaming and output: https://github.com/maxGraph/maxGraph/pull/70 +- `mxDictionary`<T> to `Dictionary`<K, V> -mxDictionary -> Dictionary ### Event handling @@ -425,10 +432,9 @@ by a semicolon as follows: > Styles are a collection of key, value pairs and a stylesheet is a collection of named styles. The names are referenced by the cellstyle, which is stored -in with the following format: [stylename;|key=value;]. The +in 'mxCell.style' with the following format: [stylename;|key=value;]. The string is resolved to a collection of key, value pairs, where the keys are overridden with the values in the string. -> See also - https://jgraph.github.io/mxgraph/docs/tutorial.html#3.3 @@ -441,8 +447,11 @@ In maxGraph, the style is no more defined as a string but as a `CellStyle` objec Most of the time, the name of `CellStyle` properties is the same as the style keys in the mxGraph style. -⚠️⚠️⚠ **WARNING**: Be aware of the properties that have been renamed or whose value types have changed, as described in the [style-properties-change](./migrate-from-mxgraph.md#style-properties-change) paragraph. +:::warning +Be aware of the properties that have been renamed or whose value types have changed, as described in the [style-properties-change](./migrate-from-mxgraph.md#style-properties-change) paragraph. + +::: **Migration example** @@ -468,7 +477,7 @@ graph.insertVertex({ **Special migration case** In `mxGraph`, to not merge properties of the default style, the style string must start with a `;` (semicolon) as in `;style1;style2;prop1=value1;.....`. -This is documented in the [mxStylesheet documentation](jgraph/mxgraph@v4.2.2/javascript/src/js/view/mxStylesheet.js#L33-L38). +This is documented in the [mxStylesheet documentation](https://github.com/jgraph/mxgraph/blob/v4.2.2/javascript/src/js/view/mxStylesheet.js#L33-L38). > To override the default style for a cell, add a leading semicolon to the style definition, e.g. ;shadow=1 This is currently not supported in maxGraph: https://github.com/maxGraph/maxGraph/issues/154 "Add a way to not use default style properties when calculating cell styles". diff --git a/packages/website/docusaurus.config.ts b/packages/website/docusaurus.config.ts new file mode 100644 index 000000000..acfd8cd39 --- /dev/null +++ b/packages/website/docusaurus.config.ts @@ -0,0 +1,136 @@ +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: 'maxGraph', + tagline: 'A TypeScript library which can display and allow interaction with vector diagrams.', + favicon: 'img/favicon.ico', + + // Set the production url of your site here + url: 'https://maxgraph.github.io/', + // Set the // pathname under which your site is served + // For GitHub pages deployment, it is often '//' + baseUrl: '/', // TODO baseUrl: '/maxGraph/', + + // GitHub pages deployment config. + // If you aren't using GitHub pages, you don't need these. + organizationName: 'maxGraph', // Usually your GitHub org/user name. + projectName: 'maxGraph', // 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/maxGraph/maxGraph/tree/main/packages/docs/', + }, + theme: { + customCss: './src/css/custom.css', + }, + } satisfies Preset.Options, + ], + ], + + themeConfig: { + // Replace with your project's social card + // image: 'img/docusaurus-social-card.jpg', + docs: { + sidebar: { + hideable: true, + }, + }, + navbar: { + title: 'maxGraph', + logo: { + alt: 'maxGraph Logo', + src: 'img/logo.svg', + }, + items: [ + { + type: 'docSidebar', + sidebarId: 'docsSidebar', + position: 'left', + label: 'Documentation', + }, + // {to: '/storybook', label: 'Demo', position: 'left'}, + // {to: '/docs/api', label: 'API', position: 'left'}, + { + href: 'https://github.com/maxGraph/maxGraph', + label: 'GitHub', + position: 'right', + }, + ], + }, + footer: { + style: 'dark', + links: [ + { + title: 'Content', + items: [ + { + label: 'Documentation', + to: '/docs/intro', + }, + // { + // label: 'Demo', + // to: '/storybook', + // }, + // { + // label: 'API', + // to: '/docs/api', + // }, + ], + }, + { + title: 'Community', + items: [ + { + label: 'Questions', + href: 'https://github.com/maxGraph/maxGraph/discussions/categories/q-a', + }, + { + label: 'Issues', + href: 'https://github.com/maxGraph/maxGraph/issues', + }, + { + label: 'Announces', + href: 'https://github.com/maxGraph/maxGraph/discussions/categories/announces', + }, + ], + }, + { + title: 'More', + items: [ + { + label: 'GitHub', + href: 'https://github.com/maxGraph/maxGraph', + }, + ], + }, + ], + copyright: `Copyright © ${new Date().getFullYear()} - The maxGraph project Contributors. Built with Docusaurus.`, + }, + prism: { + theme: prismThemes.github, + darkTheme: prismThemes.dracula, + }, + } satisfies Preset.ThemeConfig, +}; + +export default config; diff --git a/packages/docs/old-mxgraph/api-specification.txt b/packages/website/old-mxgraph/api-specification.txt similarity index 100% rename from packages/docs/old-mxgraph/api-specification.txt rename to packages/website/old-mxgraph/api-specification.txt diff --git a/packages/docs/old-mxgraph/css/manual-colors.css b/packages/website/old-mxgraph/css/manual-colors.css similarity index 100% rename from packages/docs/old-mxgraph/css/manual-colors.css rename to packages/website/old-mxgraph/css/manual-colors.css diff --git a/packages/docs/old-mxgraph/css/manual-styles.css b/packages/website/old-mxgraph/css/manual-styles.css similarity index 100% rename from packages/docs/old-mxgraph/css/manual-styles.css rename to packages/website/old-mxgraph/css/manual-styles.css diff --git a/packages/docs/old-mxgraph/images/MX_MANUAL_html_1cc55dd3.png b/packages/website/old-mxgraph/images/MX_MANUAL_html_1cc55dd3.png similarity index 100% rename from packages/docs/old-mxgraph/images/MX_MANUAL_html_1cc55dd3.png rename to packages/website/old-mxgraph/images/MX_MANUAL_html_1cc55dd3.png diff --git a/packages/docs/old-mxgraph/images/MX_MANUAL_html_ba4bf13.png b/packages/website/old-mxgraph/images/MX_MANUAL_html_ba4bf13.png similarity index 100% rename from packages/docs/old-mxgraph/images/MX_MANUAL_html_ba4bf13.png rename to packages/website/old-mxgraph/images/MX_MANUAL_html_ba4bf13.png diff --git a/packages/docs/old-mxgraph/images/MX_MANUAL_html_m75de608.png b/packages/website/old-mxgraph/images/MX_MANUAL_html_m75de608.png similarity index 100% rename from packages/docs/old-mxgraph/images/MX_MANUAL_html_m75de608.png rename to packages/website/old-mxgraph/images/MX_MANUAL_html_m75de608.png diff --git a/packages/docs/old-mxgraph/images/architecture.png b/packages/website/old-mxgraph/images/architecture.png similarity index 100% rename from packages/docs/old-mxgraph/images/architecture.png rename to packages/website/old-mxgraph/images/architecture.png diff --git a/packages/docs/old-mxgraph/images/callgraph.png b/packages/website/old-mxgraph/images/callgraph.png similarity index 100% rename from packages/docs/old-mxgraph/images/callgraph.png rename to packages/website/old-mxgraph/images/callgraph.png diff --git a/packages/docs/old-mxgraph/images/editor.png b/packages/website/old-mxgraph/images/editor.png similarity index 100% rename from packages/docs/old-mxgraph/images/editor.png rename to packages/website/old-mxgraph/images/editor.png diff --git a/packages/docs/old-mxgraph/images/graph.png b/packages/website/old-mxgraph/images/graph.png similarity index 100% rename from packages/docs/old-mxgraph/images/graph.png rename to packages/website/old-mxgraph/images/graph.png diff --git a/packages/docs/old-mxgraph/images/logo.jpg b/packages/website/old-mxgraph/images/logo.jpg similarity index 100% rename from packages/docs/old-mxgraph/images/logo.jpg rename to packages/website/old-mxgraph/images/logo.jpg diff --git a/packages/docs/old-mxgraph/images/model.png b/packages/website/old-mxgraph/images/model.png similarity index 100% rename from packages/docs/old-mxgraph/images/model.png rename to packages/website/old-mxgraph/images/model.png diff --git a/packages/docs/old-mxgraph/images/mx_man_architecture.png b/packages/website/old-mxgraph/images/mx_man_architecture.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_architecture.png rename to packages/website/old-mxgraph/images/mx_man_architecture.png diff --git a/packages/docs/old-mxgraph/images/mx_man_collapse_swim.png b/packages/website/old-mxgraph/images/mx_man_collapse_swim.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_collapse_swim.png rename to packages/website/old-mxgraph/images/mx_man_collapse_swim.png diff --git a/packages/docs/old-mxgraph/images/mx_man_drill_down.png b/packages/website/old-mxgraph/images/mx_man_drill_down.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_drill_down.png rename to packages/website/old-mxgraph/images/mx_man_drill_down.png diff --git a/packages/docs/old-mxgraph/images/mx_man_drilling.png b/packages/website/old-mxgraph/images/mx_man_drilling.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_drilling.png rename to packages/website/old-mxgraph/images/mx_man_drilling.png diff --git a/packages/docs/old-mxgraph/images/mx_man_edge_routing.png b/packages/website/old-mxgraph/images/mx_man_edge_routing.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_edge_routing.png rename to packages/website/old-mxgraph/images/mx_man_edge_routing.png diff --git a/packages/docs/old-mxgraph/images/mx_man_expand_swim.png b/packages/website/old-mxgraph/images/mx_man_expand_swim.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_expand_swim.png rename to packages/website/old-mxgraph/images/mx_man_expand_swim.png diff --git a/packages/docs/old-mxgraph/images/mx_man_graph_analysis.jpg b/packages/website/old-mxgraph/images/mx_man_graph_analysis.jpg similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_graph_analysis.jpg rename to packages/website/old-mxgraph/images/mx_man_graph_analysis.jpg diff --git a/packages/docs/old-mxgraph/images/mx_man_graph_interaction.png b/packages/website/old-mxgraph/images/mx_man_graph_interaction.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_graph_interaction.png rename to packages/website/old-mxgraph/images/mx_man_graph_interaction.png diff --git a/packages/docs/old-mxgraph/images/mx_man_graph_layout.png b/packages/website/old-mxgraph/images/mx_man_graph_layout.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_graph_layout.png rename to packages/website/old-mxgraph/images/mx_man_graph_layout.png diff --git a/packages/docs/old-mxgraph/images/mx_man_graph_vis.png b/packages/website/old-mxgraph/images/mx_man_graph_vis.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_graph_vis.png rename to packages/website/old-mxgraph/images/mx_man_graph_vis.png diff --git a/packages/docs/old-mxgraph/images/mx_man_hello_struct.png b/packages/website/old-mxgraph/images/mx_man_hello_struct.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_hello_struct.png rename to packages/website/old-mxgraph/images/mx_man_hello_struct.png diff --git a/packages/docs/old-mxgraph/images/mx_man_hello_world.png b/packages/website/old-mxgraph/images/mx_man_hello_world.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_hello_world.png rename to packages/website/old-mxgraph/images/mx_man_hello_world.png diff --git a/packages/docs/old-mxgraph/images/mx_man_log_group_struct.png b/packages/website/old-mxgraph/images/mx_man_log_group_struct.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_log_group_struct.png rename to packages/website/old-mxgraph/images/mx_man_log_group_struct.png diff --git a/packages/docs/old-mxgraph/images/mx_man_non_realtive_edge_pos.png b/packages/website/old-mxgraph/images/mx_man_non_realtive_edge_pos.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_non_realtive_edge_pos.png rename to packages/website/old-mxgraph/images/mx_man_non_realtive_edge_pos.png diff --git a/packages/docs/old-mxgraph/images/mx_man_non_relative_pos.png b/packages/website/old-mxgraph/images/mx_man_non_relative_pos.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_non_relative_pos.png rename to packages/website/old-mxgraph/images/mx_man_non_relative_pos.png diff --git a/packages/docs/old-mxgraph/images/mx_man_overlap.png b/packages/website/old-mxgraph/images/mx_man_overlap.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_overlap.png rename to packages/website/old-mxgraph/images/mx_man_overlap.png diff --git a/packages/docs/old-mxgraph/images/mx_man_rel_vert_pos.png b/packages/website/old-mxgraph/images/mx_man_rel_vert_pos.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_rel_vert_pos.png rename to packages/website/old-mxgraph/images/mx_man_rel_vert_pos.png diff --git a/packages/docs/old-mxgraph/images/mx_man_simple_graph.png b/packages/website/old-mxgraph/images/mx_man_simple_graph.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_simple_graph.png rename to packages/website/old-mxgraph/images/mx_man_simple_graph.png diff --git a/packages/docs/old-mxgraph/images/mx_man_simple_workflow.png b/packages/website/old-mxgraph/images/mx_man_simple_workflow.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_simple_workflow.png rename to packages/website/old-mxgraph/images/mx_man_simple_workflow.png diff --git a/packages/docs/old-mxgraph/images/mx_man_stencil_loaded.png b/packages/website/old-mxgraph/images/mx_man_stencil_loaded.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_stencil_loaded.png rename to packages/website/old-mxgraph/images/mx_man_stencil_loaded.png diff --git a/packages/docs/old-mxgraph/images/mx_man_styles.png b/packages/website/old-mxgraph/images/mx_man_styles.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_styles.png rename to packages/website/old-mxgraph/images/mx_man_styles.png diff --git a/packages/docs/old-mxgraph/images/mx_man_top_level.png b/packages/website/old-mxgraph/images/mx_man_top_level.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_top_level.png rename to packages/website/old-mxgraph/images/mx_man_top_level.png diff --git a/packages/docs/old-mxgraph/images/mx_man_vertex_props.png b/packages/website/old-mxgraph/images/mx_man_vertex_props.png similarity index 100% rename from packages/docs/old-mxgraph/images/mx_man_vertex_props.png rename to packages/website/old-mxgraph/images/mx_man_vertex_props.png diff --git a/packages/docs/old-mxgraph/images/mxgraph_logo.gif b/packages/website/old-mxgraph/images/mxgraph_logo.gif similarity index 100% rename from packages/docs/old-mxgraph/images/mxgraph_logo.gif rename to packages/website/old-mxgraph/images/mxgraph_logo.gif diff --git a/packages/docs/old-mxgraph/js/toc.js b/packages/website/old-mxgraph/js/toc.js similarity index 100% rename from packages/docs/old-mxgraph/js/toc.js rename to packages/website/old-mxgraph/js/toc.js diff --git a/packages/docs/old-mxgraph/known-issues.html b/packages/website/old-mxgraph/known-issues.html similarity index 100% rename from packages/docs/old-mxgraph/known-issues.html rename to packages/website/old-mxgraph/known-issues.html diff --git a/packages/docs/old-mxgraph/manual.html b/packages/website/old-mxgraph/manual.html similarity index 99% rename from packages/docs/old-mxgraph/manual.html rename to packages/website/old-mxgraph/manual.html index f9c029fe8..a67bc52e2 100644 --- a/packages/docs/old-mxgraph/manual.html +++ b/packages/website/old-mxgraph/manual.html @@ -1565,7 +1565,7 @@ children of that parent appear in the display as the complete graph.

The same graph expanded using folding instead looks like:

+ WIDTH=695 HEIGHT=227 BORDER=0>

Exiting the group using the shape->exit group option, which invokes mxGraph.exitGroup, brings you back to the original 3 vertex top level graph.

diff --git a/packages/docs/old-mxgraph/manual_javavis.html b/packages/website/old-mxgraph/manual_javavis.html similarity index 99% rename from packages/docs/old-mxgraph/manual_javavis.html rename to packages/website/old-mxgraph/manual_javavis.html index 05f49f66a..89825fb36 100644 --- a/packages/docs/old-mxgraph/manual_javavis.html +++ b/packages/website/old-mxgraph/manual_javavis.html @@ -1088,7 +1088,7 @@ children of that parent appear in the display as the complete graph.

The same graph expanded using folding instead looks like:

+ WIDTH=695 HEIGHT=227 BORDER=0>

Exiting the group using the shape->exit group option, which invokes mxGraph.exitGroup, brings you back to the original 3 vertex top level graph.

diff --git a/packages/docs/old-mxgraph/stencils.xsd b/packages/website/old-mxgraph/stencils.xsd similarity index 100% rename from packages/docs/old-mxgraph/stencils.xsd rename to packages/website/old-mxgraph/stencils.xsd diff --git a/packages/docs/old-mxgraph/tutorial.html b/packages/website/old-mxgraph/tutorial.html similarity index 100% rename from packages/docs/old-mxgraph/tutorial.html rename to packages/website/old-mxgraph/tutorial.html diff --git a/packages/website/package.json b/packages/website/package.json new file mode 100644 index 000000000..043bc4b94 --- /dev/null +++ b/packages/website/package.json @@ -0,0 +1,46 @@ +{ + "name": "@maxgraph/docs", + "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.0.0", + "@docusaurus/preset-classic": "3.0.0", + "@mdx-js/react": "^3.0.0", + "clsx": "^1.2.1", + "prism-react-renderer": "^2.1.0", + "react": "^18.0.0", + "react-dom": "^18.0.0" + }, + "devDependencies": { + "@docusaurus/module-type-aliases": "3.0.0", + "@docusaurus/tsconfig": "3.0.0", + "@docusaurus/types": "3.0.0", + "typescript": "~5.2.2" + }, + "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" + } +} diff --git a/packages/website/sidebars.ts b/packages/website/sidebars.ts new file mode 100644 index 000000000..794b96727 --- /dev/null +++ b/packages/website/sidebars.ts @@ -0,0 +1,31 @@ +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 + docsSidebar: [{ type: 'autogenerated', dirName: '.' }], + + // But you can create a sidebar manually + /* + tutorialSidebar: [ + 'intro', + 'hello', + { + type: 'category', + label: 'Tutorial', + items: ['tutorial-basics/create-a-document'], + }, + ], + */ +}; + +export default sidebars; diff --git a/packages/website/src/components/HomepageFeatures/index.tsx b/packages/website/src/components/HomepageFeatures/index.tsx new file mode 100644 index 000000000..a660da31b --- /dev/null +++ b/packages/website/src/components/HomepageFeatures/index.tsx @@ -0,0 +1,73 @@ +import clsx from 'clsx'; +import Heading from '@theme/Heading'; +import styles from './styles.module.css'; + +type FeatureItem = { + title: string; + Svg: React.ComponentType>; + description: JSX.Element; +}; + +const FeatureList: FeatureItem[] = [ + { + title: 'Based on mature technology', + Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, + description: ( + <> + maxGraph is the successor of{' '} + mxGraph (which is now EOL in its + public version), the diagram library that powers{' '} + draw.io. + + ), + }, + { + title: 'Fully typed', + Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, + description: ( + <> + maxGraph is written in TypeScript and provides precise types to guide + you easily when developing or reading API documentation. + + ), + }, + { + title: 'Flexible with convenient defaults', + Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + description: ( + <> + maxGraph is highly configurable and offers numerous extension points. + But it also provides numerous built-in elements, for example for shapes and + styles. + + ), + }, +]; + +function Feature({ title, Svg, description }: FeatureItem) { + return ( +
+
+ +
+
+ {title} +

{description}

+
+
+ ); +} + +export default function HomepageFeatures(): JSX.Element { + return ( +
+
+
+ {FeatureList.map((props, idx) => ( + + ))} +
+
+
+ ); +} diff --git a/packages/website/src/components/HomepageFeatures/styles.module.css b/packages/website/src/components/HomepageFeatures/styles.module.css new file mode 100644 index 000000000..b248eb2e5 --- /dev/null +++ b/packages/website/src/components/HomepageFeatures/styles.module.css @@ -0,0 +1,11 @@ +.features { + display: flex; + align-items: center; + padding: 2rem 0; + width: 100%; +} + +.featureSvg { + height: 200px; + width: 200px; +} diff --git a/packages/website/src/css/custom.css b/packages/website/src/css/custom.css new file mode 100644 index 000000000..2bc6a4cfd --- /dev/null +++ b/packages/website/src/css/custom.css @@ -0,0 +1,30 @@ +/** + * Any CSS included here will be global. The classic template + * bundles Infima by default. Infima is a CSS framework designed to + * work well for content-centric websites. + */ + +/* You can override the default Infima variables here. */ +:root { + --ifm-color-primary: #2e8555; + --ifm-color-primary-dark: #29784c; + --ifm-color-primary-darker: #277148; + --ifm-color-primary-darkest: #205d3b; + --ifm-color-primary-light: #33925d; + --ifm-color-primary-lighter: #359962; + --ifm-color-primary-lightest: #3cad6e; + --ifm-code-font-size: 95%; + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); +} + +/* For readability concerns, you should choose a lighter palette in dark mode. */ +[data-theme='dark'] { + --ifm-color-primary: #25c2a0; + --ifm-color-primary-dark: #21af90; + --ifm-color-primary-darker: #1fa588; + --ifm-color-primary-darkest: #1a8870; + --ifm-color-primary-light: #29d5b0; + --ifm-color-primary-lighter: #32d8b4; + --ifm-color-primary-lightest: #4fddbf; + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); +} diff --git a/packages/website/src/pages/index.module.css b/packages/website/src/pages/index.module.css new file mode 100644 index 000000000..9f71a5da7 --- /dev/null +++ b/packages/website/src/pages/index.module.css @@ -0,0 +1,23 @@ +/** + * CSS files with the .module.css suffix will be treated as CSS modules + * and scoped locally. + */ + +.heroBanner { + padding: 4rem 0; + text-align: center; + position: relative; + overflow: hidden; +} + +@media screen and (max-width: 996px) { + .heroBanner { + padding: 2rem; + } +} + +.buttons { + display: flex; + align-items: center; + justify-content: center; +} diff --git a/packages/website/src/pages/index.tsx b/packages/website/src/pages/index.tsx new file mode 100644 index 000000000..3f91c38e8 --- /dev/null +++ b/packages/website/src/pages/index.tsx @@ -0,0 +1,42 @@ +import clsx from 'clsx'; +import Link from '@docusaurus/Link'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import Layout from '@theme/Layout'; +import HomepageFeatures from '@site/src/components/HomepageFeatures'; +import Heading from '@theme/Heading'; + +import styles from './index.module.css'; + +function HomepageHeader() { + const { siteConfig } = useDocusaurusContext(); + return ( +
+
+ + {siteConfig.title} + +

{siteConfig.tagline}

+
+ + maxGraph Introduction + +
+
+
+ ); +} + +export default function Home(): JSX.Element { + const { siteConfig } = useDocusaurusContext(); + return ( + + +
+ +
+
+ ); +} diff --git a/packages/website/src/pages/markdown-page.md b/packages/website/src/pages/markdown-page.md new file mode 100644 index 000000000..9756c5b66 --- /dev/null +++ b/packages/website/src/pages/markdown-page.md @@ -0,0 +1,7 @@ +--- +title: Markdown page example +--- + +# Markdown page example + +You don't need React to write simple standalone pages. diff --git a/packages/website/static/.nojekyll b/packages/website/static/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/packages/website/static/img/docusaurus.png b/packages/website/static/img/docusaurus.png new file mode 100644 index 0000000000000000000000000000000000000000..f458149e3c8f53335f28fbc162ae67f55575c881 GIT binary patch literal 5142 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 F{0H{b<4^zq literal 0 HcmV?d00001 diff --git a/packages/website/static/img/favicon.ico b/packages/website/static/img/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c01d54bcd39a5f853428f3cd5aa0f383d963c484 GIT binary patch literal 3626 zcmb`Je@s(X6vrR`EK3%b%orErlDW({vnABqA zcfaS{d+xbU5JKp0*;0YOg+;Fl!eT)XRuapIwFLL`=imZCSon$`se`_<%@MB=M~KG+ z=EW^FL`w|Bo>*ktlaS^(fut!95`iG5u=SZ8nfDHO#GaTlH1-XG^;vsjUb^gWTVz0+ z^=WR1wv9-2oeR=_;fL0H7rNWqAzGtO(D;`~cX(RcN0w2v24Y8)6t`cS^_ghs`_ho? z{0ka~1Dgo8TfAP$r*ua?>$_V+kZ!-(TvEJ7O2f;Y#tezt$&R4 zLI}=-y@Z!grf*h3>}DUL{km4R>ya_I5Ag#{h_&?+HpKS!;$x3LC#CqUQ8&nM?X))Q zXAy2?`YL4FbC5CgJu(M&Q|>1st8XXLZ|5MgwgjP$m_2Vt0(J z&Gu7bOlkbGzGm2sh?X`){7w69Y$1#@P@7DF{ZE=4%T0NDS)iH`tiPSKpDNW)zmtn( zw;4$f>k)4$LBc>eBAaTZeCM2(iD+sHlj!qd z2GjRJ>f_Qes(+mnzdA^NH?^NB(^o-%Gmg$c8MNMq&`vm@9Ut;*&$xSD)PKH{wBCEC z4P9%NQ;n2s59ffMn8*5)5AAg4-93gBXBDX`A7S& zH-|%S3Wd%T79fk-e&l`{!?lve8_epXhE{d3Hn$Cg!t=-4D(t$cK~7f&4s?t7wr3ZP z*!SRQ-+tr|e1|hbc__J`k3S!rMy<0PHy&R`v#aJv?`Y?2{avK5sQz%=Us()jcNuZV z*$>auD4cEw>;t`+m>h?f?%VFJZj8D|Y1e_SjxG%J4{-AkFtT2+ZZS5UScS~%;dp!V>)7zi`w(xwSd*FS;Lml=f6hn#jq)2is4nkp+aTrV?)F6N z>DY#SU0IZ;*?Hu%tSj4edd~kYNHMFvS&5}#3-M;mBCOCZL3&;2obdG?qZ>rD|zC|Lu|sny76pn2xl|6sk~Hs{X9{8iBW zwiwgQt+@hi`FYMEhX2 \ No newline at end of file diff --git a/packages/website/static/img/undraw_docusaurus_mountain.svg b/packages/website/static/img/undraw_docusaurus_mountain.svg new file mode 100644 index 000000000..af961c49a --- /dev/null +++ b/packages/website/static/img/undraw_docusaurus_mountain.svg @@ -0,0 +1,171 @@ + + Easy to Use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/website/static/img/undraw_docusaurus_react.svg b/packages/website/static/img/undraw_docusaurus_react.svg new file mode 100644 index 000000000..94b5cf08f --- /dev/null +++ b/packages/website/static/img/undraw_docusaurus_react.svg @@ -0,0 +1,170 @@ + + Powered by React + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/website/static/img/undraw_docusaurus_tree.svg b/packages/website/static/img/undraw_docusaurus_tree.svg new file mode 100644 index 000000000..d9161d339 --- /dev/null +++ b/packages/website/static/img/undraw_docusaurus_tree.svg @@ -0,0 +1,40 @@ + + Focus on What Matters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/website/tsconfig.json b/packages/website/tsconfig.json new file mode 100644 index 000000000..314eab8a4 --- /dev/null +++ b/packages/website/tsconfig.json @@ -0,0 +1,7 @@ +{ + // This file is not used in compilation. It is here just for a nice editor experience. + "extends": "@docusaurus/tsconfig", + "compilerOptions": { + "baseUrl": "." + } +}