Skip to content

Latest commit

 

History

History
106 lines (68 loc) · 2.3 KB

guide_docusaurus.rst

File metadata and controls

106 lines (68 loc) · 2.3 KB
.. author:: Thomas Johnson <https://johnson.tj/>
.. tag:: lang-nodejs
.. tag:: web
.. tag:: documentation

Logo

Docusaurus

.. tag_list::

Docusaurus makes it easy to maintain Open Source documentation websites.


Note

For this guide you should be familiar with the basic concepts of

Prerequisites

Node and npm

We're using :manual:`Node.js <lang-nodejs>` in the latest version:

[isabell@stardust ~]$ uberspace tools version show node
Using 'Node.js' version: '18'
[isabell@stardust ~]$

Your website domain needs to be set up:

Installation

We create the application directory and install the latest version. The website is created with the classic template in the directory my-website.

[isabell@stardust ~]$ mkdir docusaurus
[isabell@stardust ~]$ cd docusaurus
[isabell@stardust docusaurus]$ npm init docusaurus@latest my-website classic
[...]
[isabell@stardust docusaurus]$

Setup daemon

Create ~/etc/services.d/docusaurus.ini with the following content:

[program:docusaurus]
directory=%(ENV_HOME)s/docusaurus/my-website
command=npm start -- --host 0.0.0.0
autostart=yes
autorestart=yes
startsecs=30

Configure web server

Note

Docusaurus is running on port 3000.

Updates

Note

Check the update feed regularly to stay informed about the newest version.

[isabell@stardust ~]$ supervisorctl stop docusaurus
[isabell@stardust ~]$ cd ~/docusaurus/my-website
[isabell@stardust docusaurus]$ npm update docusaurus
[isabell@stardust docusaurus]$ supervisorctl start docusaurus
[isabell@stardust docusaurus]$

Tested with Docusaurus 3.0.0 and Uberspace 7.15.4

.. author_list::