Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@docusaurus/core
Advanced tools
@docusaurus/core is a powerful static site generator designed to help you build, deploy, and maintain documentation websites. It is highly customizable and supports modern web development practices, making it a popular choice for creating documentation for open-source projects, products, and more.
Creating a New Docusaurus Site
This command initializes a new Docusaurus site using the 'classic' template. It sets up the basic structure and necessary files for a documentation website.
npx create-docusaurus@latest my-website classic
Adding a New Page
This configuration file (docusaurus.config.js) adds a new page to the Docusaurus site. It includes settings for the navbar, footer, and other site-wide configurations.
module.exports = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
url: 'https://your-docusaurus-test-site.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
themeConfig: {
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
to: 'docs/',
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
},
{to: 'blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Style Guide',
to: 'docs/',
},
{
label: 'Second Doc',
to: 'docs/doc2/',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
},
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: 'blog',
},
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl:
'https://github.com/facebook/docusaurus/edit/master/website/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/facebook/docusaurus/edit/master/website/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
};
Deploying the Site
This command deploys the Docusaurus site to GitHub Pages. It uses the GitHub username and SSH for authentication.
GIT_USER=<Your GitHub username> USE_SSH=true npm run deploy
VuePress is a static site generator powered by Vue.js. It is similar to Docusaurus in that it is used for creating documentation websites, but it leverages the Vue.js ecosystem for theming and customization.
Gatsby is a React-based framework for building static sites. It is highly flexible and can be used for a wide range of web applications, including documentation sites. Compared to Docusaurus, Gatsby offers more extensive plugin support and customization options.
MkDocs is a static site generator geared towards project documentation. It is written in Python and uses Markdown for content creation. While it is not as customizable as Docusaurus, it is simple to use and integrates well with Python projects.
3.5.2 (2024-08-13)
docusaurus-theme-common
docusaurus
create-docusaurus
, docusaurus-plugin-content-blog
docusaurus-theme-classic
g
, j
, p
, q
, and y
) (@josh-wong)docusaurus-theme-classic
, docusaurus-theme-common
, docusaurus-theme-translations
FAQs
Easy to Maintain Open Source Documentation Websites
The npm package @docusaurus/core receives a total of 293,945 weekly downloads. As such, @docusaurus/core popularity was classified as popular.
We found that @docusaurus/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.