Skip to content

Commit 377a4cf

Browse files
committed
Upgrade to Docusaurus v3
1 parent 03aa4b4 commit 377a4cf

25 files changed

Lines changed: 1510 additions & 857 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ open-clib/Cargo.lock
4343
/website/node_modules/
4444
/website/yarn.lock
4545
/website/build/
46+
/website/.docusaurus/
4647
!/website/pages/
4748
!/website/static/
4849
!/website/*.js
@@ -73,4 +74,4 @@ open-clib/Cargo.lock
7374
*private*
7475
.DS_Store
7576
/img/
76-
private/
77+
private/

docs/example-nmpc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id: example-nmpc
33
title: Control of population dynamics
44
sidebar_label: Population dynamics
5-
description: Nonlinear model predictive control with OpEn: population dynamics
5+
description: "Nonlinear model predictive control with OpEn: population dynamics"
66
---
77
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script>
88
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

docs/example_bnp_py.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ builder.build()
214214
```
215215

216216
This will generate a solver in Rust as well as a [TCP server](./python-tcp-ip) that will
217-
listen for requests at `localhost:8333` (this [can be configured](python-advanced#tcp-ip-interface)).
217+
listen for requests at `localhost:8333` (this [can be configured](python-advanced#tcpip-interface)).
218218

219219

220220

docs/example_tanks_py.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ builder.build()
221221
```
222222

223223
This will generate a solver in Rust as well as a [TCP server](./python-tcp-ip) that will
224-
listen for requests at `localhost:8333` (this [can be configured](python-advanced#tcp-ip-interface)).
224+
listen for requests at `localhost:8333` (this [can be configured](python-advanced#tcpip-interface)).
225225

226226

227227

@@ -286,4 +286,3 @@ In the above simulations, the average solution time is **134us** and the maximum
286286
We ran a second set of simulations with double the original prediction horizon,
287287
namely $N=240$, and the average solution time increased to **343us** and the maximum time was
288288
**1.44ms**.
289-

docs/python-interface.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: python-interface
33
title: Opengen basics
4-
description: Introduction to opengen: OpEn's Python interface
4+
description: "Introduction to opengen: OpEn's Python interface"
55
---
66

77
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script>
@@ -193,7 +193,7 @@ plan to use the optimizer on an embedded device.
193193
to <code>.with_tcp_interface_config()</code> a <code>TcpServerConfiguration</code> object.
194194
By default, the server will bind on <code>127.0.0.1</code> and will listen for
195195
requests at port <code>8333</code>.
196-
See the <a href="/optimization-engine/docs/python-advanced#tcp-ip-options">advanced options</a> for details.</div>
196+
See the <a href="/optimization-engine/docs/python-advanced#tcpip-interface">advanced options</a> for details.</div>
197197

198198

199199
This will instruct opegen to store the generated optimizer in

docs/python-tcp-ip.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: How to use the TCP/IP API for OpEn
1010
As discussed [previously], one possible way of invoking an auto-generated parametric
1111
optimizer is over a TCP/IP socket.
1212

13-
[previously]: /optimization-engine/docs/python-interface#calling-the-optimizer
13+
[previously]: /optimization-engine/docs/python-interface#calling-the-optimizer-locally
1414

1515
<img src="/optimization-engine/img/edge_intelligence.png" alt="Edge Intelligence Logo"/>
1616

@@ -33,7 +33,7 @@ $ RUST_LOG=tcp_iface=info cargo run
3333
We can then call the server from any programming language. Next, we will give examples
3434
using a Linux terminal and the command `netcat` (or `nc`).
3535

36-
[`OptimizerTcpManager`]: /optimization-engine/docs/python-interface#calling-the-optimizer
36+
[`OptimizerTcpManager`]: /optimization-engine/docs/python-interface#calling-the-optimizer-locally
3737

3838

3939
## TCP/IP Socket interface
@@ -152,4 +152,3 @@ The following errors may be returned to the client
152152
| 1700 | Wrong dimension of Langrange multipliers |
153153
| 2000 | Problem solution failed (solver error) |
154154
| 3003 | Vector `parameter` has wrong length |
155-

website/README.md

Lines changed: 34 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -1,193 +1,57 @@
1-
This website was created with [Docusaurus](https://docusaurus.io/).
1+
This website now uses Docusaurus v3.
22

3-
# What's In This Document
3+
# Development
44

5-
* [Get Started in 5 Minutes](#get-started-in-5-minutes)
6-
* [Directory Structure](#directory-structure)
7-
* [Editing Content](#editing-content)
8-
* [Adding Content](#adding-content)
9-
* [Full Documentation](#full-documentation)
10-
11-
# Get Started in 5 Minutes
12-
13-
1. Make sure all the dependencies for the website are installed:
5+
Install dependencies:
146

157
```sh
16-
# Install dependencies
17-
$ yarn
18-
```
19-
2. Run your dev server:
20-
21-
```sh
22-
# Start the site
23-
$ yarn start
24-
```
25-
26-
## Directory Structure
27-
28-
Your project file structure should look something like this
29-
30-
```
31-
my-docusaurus/
32-
docs/
33-
doc-1.md
34-
doc-2.md
35-
doc-3.md
36-
website/
37-
blog/
38-
2016-3-11-oldest-post.md
39-
2017-10-24-newest-post.md
40-
core/
41-
node_modules/
42-
pages/
43-
static/
44-
css/
45-
img/
46-
package.json
47-
sidebar.json
48-
siteConfig.js
49-
```
50-
51-
# Editing Content
52-
53-
## Editing an existing docs page
54-
55-
Edit docs by navigating to `docs/` and editing the corresponding document:
56-
57-
`docs/doc-to-be-edited.md`
58-
59-
```markdown
60-
---
61-
id: page-needs-edit
62-
title: This Doc Needs To Be Edited
63-
---
64-
65-
Edit me...
66-
```
67-
68-
For more information about docs, click [here](https://docusaurus.io/docs/en/navigation)
69-
70-
## Editing an existing blog post
71-
72-
Edit blog posts by navigating to `website/blog` and editing the corresponding post:
73-
74-
`website/blog/post-to-be-edited.md`
75-
```markdown
76-
---
77-
id: post-needs-edit
78-
title: This Blog Post Needs To Be Edited
79-
---
80-
81-
Edit me...
8+
yarn
829
```
8310

84-
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
85-
86-
# Adding Content
87-
88-
## Adding a new docs page to an existing sidebar
11+
Start the local dev server:
8912

90-
1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`:
91-
92-
```md
93-
---
94-
id: newly-created-doc
95-
title: This Doc Needs To Be Edited
96-
---
97-
98-
My new content here..
13+
```sh
14+
yarn start
9915
```
10016

101-
1. Refer to that doc's ID in an existing sidebar in `website/sidebar.json`:
17+
Build the production site:
10218

103-
```javascript
104-
// Add newly-created-doc to the Getting Started category of docs
105-
{
106-
"docs": {
107-
"Getting Started": [
108-
"quick-start",
109-
"newly-created-doc" // new doc here
110-
],
111-
...
112-
},
113-
...
114-
}
19+
```sh
20+
yarn build
11521
```
11622

117-
For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation)
118-
119-
## Adding a new blog post
120-
121-
1. Make sure there is a header link to your blog in `website/siteConfig.js`:
23+
Preview the production build locally:
12224

123-
`website/siteConfig.js`
124-
```javascript
125-
headerLinks: [
126-
...
127-
{ blog: true, label: 'Blog' },
128-
...
129-
]
25+
```sh
26+
yarn serve
13027
```
13128

132-
2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`:
133-
134-
`website/blog/2018-05-21-New-Blog-Post.md`
135-
136-
```markdown
137-
---
138-
author: Frank Li
139-
authorURL: https://twitter.com/foobarbaz
140-
authorFBID: 503283835
141-
title: New Blog Post
142-
---
29+
Deploy to GitHub Pages:
14330

144-
Lorem Ipsum...
31+
```sh
32+
yarn deploy
14533
```
14634

147-
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
148-
149-
## Adding items to your site's top navigation bar
35+
# Project Layout
15036

151-
1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`:
152-
153-
`website/siteConfig.js`
154-
```javascript
155-
{
156-
headerLinks: [
157-
...
158-
/* you can add docs */
159-
{ doc: 'my-examples', label: 'Examples' },
160-
/* you can add custom pages */
161-
{ page: 'help', label: 'Help' },
162-
/* you can add external links */
163-
{ href: 'https://github.com/facebook/Docusaurus', label: 'GitHub' },
164-
...
165-
],
166-
...
167-
}
16837
```
169-
170-
For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation)
171-
172-
## Adding custom pages
173-
174-
1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`:
175-
1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element:
176-
177-
`website/siteConfig.js`
178-
```javascript
179-
{
180-
headerLinks: [
181-
...
182-
{ page: 'my-new-custom-page', label: 'My New Custom Page' },
183-
...
184-
],
185-
...
186-
}
38+
optimization-engine/
39+
docs/ # documentation markdown files
40+
website/
41+
blog/ # blog posts
42+
src/
43+
css/
44+
pages/
45+
static/
46+
img/
47+
js/
48+
docusaurus.config.js
49+
sidebars.js
50+
package.json
18751
```
18852

189-
For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages).
190-
191-
# Full Documentation
53+
# Notes
19254

193-
Full documentation can be found on the [website](https://docusaurus.io/).
55+
- The docs remain in the repository root under `/docs`.
56+
- Legacy inline MathJax and widget scripts are stripped at build time, and equivalent site-wide support is loaded from `website/static/js`.
57+
- Sidebar ordering now lives in `website/sidebars.js`.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: SuperSCS: OpEn's sister project
2+
title: "SuperSCS: OpEn's sister project"
33
author: Pantelis Sopasakis
44
authorURL: http://twitter.com/isToxic
55
authorImageURL: https://pbs.twimg.com/profile_images/1062281000171003904/KkolV9Eg_400x400.jpg
@@ -9,4 +9,4 @@ authorImageURL: https://pbs.twimg.com/profile_images/1062281000171003904/KkolV9E
99

1010
SuperSCS is a fast solver for large-scale conic problems. It is written in C and can be interfaced from a lot of different programming languages.
1111

12-
The paper titled "SuperSCS: fast and accurate large-scale conic optimization" (authors: P. Sopasakis, K. Menounou, P. Patrinos) has been accepted at European Control Conference 2019.
12+
The paper titled "SuperSCS: fast and accurate large-scale conic optimization" (authors: P. Sopasakis, K. Menounou, P. Patrinos) has been accepted at European Control Conference 2019.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: OpEn: a pure Rust optimizer
2+
title: "OpEn: a pure Rust optimizer"
33
author: Pantelis Sopasakis
44
authorURL: http://twitter.com/isToxic
55
authorImageURL: https://pbs.twimg.com/profile_images/1062281000171003904/KkolV9Eg_400x400.jpg
@@ -9,4 +9,4 @@ The majority of optimization packages in Rust, such as [IPOPT](https://crates.io
99

1010
![Rust language](/optimization-engine/img/rust1.jpeg)
1111

12-
**OpEn** is the first **pure-Rust** package
12+
**OpEn** is the first **pure-Rust** package

0 commit comments

Comments
 (0)