Está viendo la página Spain versión del sitio.
Le gustaría cambiar a su sitio local?
15 MIN TIEMPO DE LECTURA

DOCUSAURUS

Build a cloud-based documentation site

Jamie Munro shows you how to set up GitHub, Docusaurus and Netlify to generate a professional-looking static documentation site.

OUR EXPERT

Jamie Munro maintains the documentation for healthecco. org, an open source project that uses NLP and graph technologies to bring the world’s health knowledge to researchers and medical decision makers.

QUICKTIPS

The GitHub repository we created during the making of this tutorial is available for reference at https://github. com/Jiros/ docusaurus.

D ocusaurus is an open source documentation application developed by Facebook. It’s one of a growing number of JAMstack static site generators that uses a blend of JavaScript, React and markdown to make it easy for you to deploy clean, professional-looking documentation sites that are easy to maintain. A Docusaurus site can be managed as a git repository, meaning that version control is baked in and, perhaps most importantly, your developers can use their tool of choice to directly edit the content in markdown files, or even edit the files directly on GitHub. Although Docusaurus v2 is technically still in beta, they recommend using it, even in production.

The objective of this tutorial is to deploy a customised documentation site to the cloud using GitHub and a free Netlify account. Netlify, GitHub and Docusaurus are all powerful tools with many different features that we couldn’t possibly hope to cover in a single tutorial, so we’ll only be touching on the bare essentials to get a site configured and deployed.

Docusaurus is (perhaps unsurprisingly for a documentation platform) well documented and there are a number of good ‘getting started with GitHub’ guides available online.

Installasaurus

Docusaurus requires node.js version 12.13 or greater. If you’re using Ubuntu then be aware that the official repository is several versions behind on version 10.19. We recommend grabbing a binary from NodeSource – https://github.com/nodesource/distributions. We tested both the LTS (14) and current node.js (16) binaries on Ubuntu 20.04.2.

To install Node.js version 16 on Debian/Ubuntubased systems, open a new terminal window and type:

$ curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - $ sudo apt-get install -y nodejs

You can confirm node.js is installed by checking the version at the command line: $ node -v

Because our ultimate goal is to use GitHub to manage and deploy our Docusaurus instance we’ll create a new, empty repository on GitHub, clone it locally and then install Docusaurus. To do this you’ll need to log in (or sign up) to GitHub.com You can create a repository under the Repositories tab by clicking New and entering a name for the repository. This can be anything and will appear as the directory name once you’ve cloned the repository to your local PC.

Desbloquea este artículo y mucho más con
Puedes disfrutar:
Disfrute de esta edición al completo
Acceso instantáneo a más de 600 títulos
Miles de números atrasados
Sin contrato ni compromiso
Inténtalo €1.09
SUSCRÍBETE AHORA
30 días de acceso, luego sólo €11,99 / mes. Cancelación en cualquier momento. Sólo para nuevos abonados.


Más información
Pocketmags Plus
Pocketmags Plus

Este artículo es de...


View Issues
Linux Format
Summer 2021
VER EN TIENDA

Otros artículos de este número


WELCOME
Cross the streams
Live streaming isn’t a subject we touch upon
REGULARS AT A GLANCE
What does Windows 11 mean for Linux?
Microsoft has unveiled a new operating system, but will it play nice?
AMD FidelityFX Super Resolution technology now available
The source code is out for AMD’s upscaling technology – but when is it coming to Linux?
AlmaLinux OS 8.4 now available
Claims to be the only community-owned CentOS option
WINE, VULKAN & WAYLAND
Alexandros Frantzis is a senior software engineer at
OVER-DEPLOYED
Keith Edmunds is MD of Tiger Computing Ltd,
Intel makes a move on SiFive
$2 billion apparently offered for the semiconductor startup
New RISC-V CPU hails from China
Chinese Academy of Sciences reveals the Xiangshan CPU
Chromebook sales hit new heights
Rise of 276% year-on-year
Distro watch
What’s down the side of the free software sofa?
SERVES YOU RIGHT
Matt Yonkovit is Percona’s Head of Open Source
TIME FOR A CHANGE
Jon Masters has been involved with Linux for
KERNEL WATCH
Jon Masters summarises the latest happenings in the Linux kernel, so that you don’t have to
Answers
Got a burning question about open source or the kernel? Whatever your level, email it to lxf.answers@futurenet.com
Library loafer
We’ll get our top men on it immediately.
LETTER OF THE MONTH
Run my school I’ve been implementing Ubuntu and
Inkscape
Inkscape > Maestrial >Cinnamon >Qmplay2 >GitQlient >Gifski >FreeTube
On the disc
Zorin OS Lite
REVIEWS
GeForce RTX 3070 Ti
Nvidia’s latest Ti takes aim at AMD’s RX 6800, reveals Jacob Ridley.
Koozali SME Server 10
Mayank Sharma has a particular fondness for point-and-click server distributions that roll out in a jiffy and don’t eat into his leisure time
MakuluLinux LinDoz
Always on the hunt for distros that can help him reel in users to Linux, Mayank Sharma finds one that matches his sensibilities
Venom Linux 2.1
Trying to punch above his weight, Mayank Sharma finally finds a sourcebased distro that’ll satiate his need to run a source-based distro
Tribblix Milestone 25
Poking his nose where he’s not supposed to, Mayank Sharma finds himself inside a Solaris variant that he just can’t seem to shake off
WilderMyth
Management doesn’t much like epic storytelling of heroic deeds – even if it is around the watercooler – so Sin Vega is in a lot of trouble
ROUNDUP
Roundup
ROUNDUP WE COMPARE Office TONS suites OF STUFF SO YOU DON’T HAVE TO!
The Verdict Office suites
T his month’s Roundup has shown that all
RASPBERRY Pi STREAMING
Camera-shy Jonni Bidwell conquers his fears as he harnesses the power of OBS Studio to stream live to his, er, three followers
Streaming basics
The hardware and infrastructure you’ll need to get your stream live
Introducing OBS Studio
The gold standard for home streaming software is open source, powerful and really easy to learn. It’s a triple whammy threat!
Pi-assisted streaming
Use one of your many spare Raspberry Pis as a remote camera or go crazy and run everything from a Raspberry Pi 4
Further, faster, free-er streaming
Discover what else OBS can do, then cut the corporate cord and host your own stream with Owncast
IN-DEPTH
BEHIND THE VPN VEIL
If you take your privacy seriously you need to take VPNs seriously. David Rutland goes off the record, on the QT and very hush-hush
RESCUE & REPAIR
Fixit-bot Jonni Bidwell reveals how rescue distros can quickly diagnose and cure diverse Linux problems
Pi User
Fancy a micro-ATX Pi Pico running Rust OS?
It’s what the world has been crying out for, right?
Arduino IDE 2.0 Beta 7
Les Pounder gently pushes away a slice of Pi and looks for something a little fresher among the serving plates of his maker buffet
Take better photos with your Raspberry Pi
Mike Bedford explains how to get the most from the Raspberry Pi HQ Camera and learn the basic principles of photography at the same time
Pi USER
Building robots inScratch with GPIO
Take your first motorised step with Les Pounder as he shows you how to use Scratch to build and control a simple robot
Design breadboards, circuits and PCBs
Designing a circuit to interface to a Raspberry Pi or Arduino? Then grab a copy of the open source Fritzing package. Mike Bedford is your guide
TUTORIALS
Stress-test your CPU
While Shashank Sharma isn’t fond of stress-testing the weighing scale, he’s fine with tools like S-TUI, which help him monitor CPU performance
Get a better image viewer and editor
Nick Peers goes hunting for a top-class image viewer – and is pleasantly surprised by what he finds
Get to grips with virtual networks
Harness the power of VirtualBox networks to create self-contained virtual networks within your own computer. Stuart Burns reveals all
How to easily connect OnlyOffice to your DMS
If you need to edit and co-author documents within your document management system, then Kseniya Fedoruk has the right solution for you
How to emulate an Acorn Electron
Les Pounder takes us back to a time when bedroom coders ruled the world and playground battles were fought for your micro
CODING ACADEMY
Build a static analysis development pipeline
Discover how to build securer web apps in Tim Armstrong’s new series, who starts with the essentials of Static Analysis and CI/CD
Manipulate data like a pro with Pandas
Pull up a chair and make yourself comfortable as Mihalis Tsoukalos explains how to use Pandas for storing and manipulating tabular data
Chat
X
Soporte Pocketmags