Socket
Socket
Sign inDemoInstall

@docusaurus/core

Package Overview
Dependencies
71
Maintainers
5
Versions
1704
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @docusaurus/core

Easy to Maintain Open Source Documentation Websites


Version published
Weekly downloads
305K
decreased by-0.82%
Maintainers
5
Created
Weekly downloads
 

Package description

What is @docusaurus/core?

@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.

What are @docusaurus/core's main functionalities?

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

Other packages similar to @docusaurus/core

Changelog

Source

2.2.0 (2022-10-29)

:rocket: New Feature
  • docusaurus-plugin-client-redirects
    • #8227 feat(plugin-client-redirects): keep the query string + hash (@Xabilahu)
  • docusaurus
    • #8210 feat(core): add --config param to swizzle command (@e-im)
  • docusaurus-mdx-loader, docusaurus-plugin-content-blog, docusaurus-plugin-content-docs, docusaurus-plugin-content-pages, docusaurus-theme-classic, docusaurus-theme-mermaid, docusaurus-types, docusaurus
    • #7490 feat: support mermaid code blocks in Markdown (@sjwall)
  • docusaurus-types, docusaurus
    • #8151 feat(core): siteConfig.headTags API to render extra tags in document head (@johnnyreilly)
:bug: Bug Fix
  • docusaurus-plugin-ideal-image
  • docusaurus-theme-common
    • #8246 fix(mdx-loader): properly unwrap mdxAdmonitionTitle placeholder (@Josh-Cena)
  • docusaurus-plugin-content-docs
    • #8234 fix(plugin-content-docs): fix error message context (error cause) when doc processing fails (@shanpriyan)
  • docusaurus-theme-classic, docusaurus-theme-translations
    • #8207 fix(theme-classic): hamburger menu control navigation by keyboard (@jeferson-sb)
  • docusaurus-theme-classic, docusaurus-theme-common
    • #8204 fix(theme-classic): fix SkipToContent without JS , refactor, make it public theming API (@mturoci)
    • #8059 fix(theme): preserve url ?search#hash on navbar version/locale dropdowns navigations (@slorber)
  • docusaurus
    • #8192 fix(core): throw error for invalid URL in config file (@forgeRW)
  • docusaurus-theme-classic
  • docusaurus-utils
    • #8137 fix(utils): remove non-ASCII limitation for path normalization (@birjj)
    • #8158 fix(content-blog): make RSS feed generation work with slugs with .html extension (@Pranav2612000)
  • docusaurus-theme-translations
  • docusaurus-plugin-client-redirects
    • #8067 fix(redirect): tolerate trailing slash difference if config is undefined (@Josh-Cena)
:nail_care: Polish
  • docusaurus-theme-translations
    • #8253 chore(theme-translations): complete ru translations (@lex111)
    • #8243 chore(theme-translations): complete French translations (@forresst)
    • #8075 fix(theme-translation): complete Japanese theme default translation (@pasora)
  • docusaurus
  • docusaurus-theme-classic
    • #8161 fix(theme): do not show tab content when tabbing over it; show after selection only (@mturoci)
    • #8062 refactor(theme): remove hard-coded tag border-radius (@homotechsual)
  • docusaurus-utils-validation, docusaurus
    • #8066 fix(core): normalize slashes for url/baseUrl instead of throwing (@Josh-Cena)
Committers: 22

Readme

Source

Docusaurus core

Keywords

FAQs

Last updated on 29 Oct 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc