Skip to content
Public template

About

A repository template to build dev-blog website with docusaurus

Resources

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

My Developer Blog

This website is built using Docusaurus, a modern static website generator.

Repository Description

This repository hosts a developer blog built with Docusaurus. It includes tools and scripts for creating, managing, and deploying static web content. The software supports rapid local development, customizable theming, and seamless deployment to platforms like GitHub Pages or NGINX.

Table of Contents

Quickstart

Prerequisites

  1. Installation

    $ pnpm install
    
  2. Local Development

    $ pnpm start
    

    This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

  3. Build

    $ pnpm build
    

    This command generates static content into the build directory and can be served using any static contents hosting service.

  4. Deployment

    In order to deploy onto Github Pages, ensure that your docusaurus.config.ts conforms with the documentation guidelines. After that is ensured run the following command to deploy:

    $ USE_SSH=true pnpm deploy
    

For detailed information about deploying this Docusaurus project, refer to the Deployment section below.

Repository Structure

The repository is organized as follows:

  • blog/: Contains markdown files for blog posts. Blog-related metadata is automatically picked up by the Docusaurus configuration.
  • docs/: Contains markdown files for documentation. These files are referenced in sidebars.ts to define the sidebar structure.
  • src/: Contains custom React components, CSS, and JavaScript for additional functionality or theming.
  • static/: Stores static assets (e.g., images, icons) served directly without processing.
  • sidebars.ts: Configures the structure of sidebars in the documentation section.
  • docusaurus.config.ts: Main configuration file for customizing and managing Docusaurus behavior.
  • build/: Generated after running the pnpm build command. Contains the static website files ready for deployment.

New content can be added as follows:

  • Add new documentation files to the docs/ folder.
  • Add new blog posts to the blog/ folder. No additional configuration is required.

Deployment

Deploy to Github Pages

To deploy using SSH:

$ USE_SSH=true pnpm deploy

To deploy without using SSH, run:

$ GIT_USER=<Your GitHub username> pnpm deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.

Deploying using NGINX

To deploy the site using NGINX and Docker, follow this guide

About

A repository template to build dev-blog website with docusaurus

Resources

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages