npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@uniwebcms/tutorial-starter

v1.1.2

Published

An npm library that helps you quickly create a tutorial website using Docusaurus.

Downloads

8

Readme

tutorial-starter

tutorial-starter is an npm library that helps you quickly create a tutorial website using Docusaurus.

Getting Started

Prerequisites

  • Node.js (version 16.14 or higher)
  • npm (Node Package Manager) or Yarn

Quick Start

To create a new tutorial website, use the following command:

npx @uniwebcms/tutorial-starter@latest init [project-name]

This will initialize a new tutorial website project in the project-name directory under your project root. The `project-name` argument is optional. If you don't provide a project name, the default name "tutorial" will be used.

Project Structure

Once initialized, the project structure will look like this:

my-tutorial-website/
    ├── README.md
    ├── babel.config.js
    ├── docs
    │   └── sample-doc.mdx
    ├── docusaurus.config.js
    ├── package.json
    ├── scripts
    │   ├── checkUpdate.js
    │   └── prebuild.js
    ├── sidebars.js
    ├── src
    │   ├── components
    │   │   └── index.js
    │   ├── css
    │   │   └── custom.css
    │   └── pages
    │       └── index.mdx
    └── static
        ├── img
        │   ├── favicon.png
        │   ├── logo.svg
        │   ├── sample.png
        │   ├── uniweb_black.svg
        │   └── uniweb_white.svg
        └── schemas
            └── sample.json
  • The docs directory contains the documentation files for your tutorial website.
  • The src directory contains the component, css file and pages.
  • The static directory contains the static assets files such as image and json files.
  • The docusaurus.config.js file is the configuration file for Docusaurus.
  • The sidebar.js file is the configuration file for website sidebar.

Local Development

To start a local development server and preview your tutorial website, run the following commands:

cd my-tutorial-website
npm install
npm start
# OR
yarn install
yarn start

Build and serve locally for testing

cd my-tutorial-website
npm run build:dev
npm run serve:dev
# OR
yarn build:dev
yarn serve:dev

The built website will be available in the build under my-tutorial-website directory.

This will start the development server, and you can view the website at http://localhost:3000.

Building for Production

To build the website for production, you have the following two options:

Build and locally and commit manually

cd my-tutorial-website
npm run build:prod
# OR
yarn build:prod

The built website will be available in the dist under the project root directory, you can them manually commit it.

Build using GitHub Actions workflow

cd my-tutorial-website
npm run build:gh
# OR
yarn build:gh

This script should be used in a workflow executed by GitHub Actions to provide the necessary environment variables. The built website will be available in the dist directory under the project's root. Once the build artifact is uploaded to GitHub Pages, the website can be visited via the GitHub Pages URL.

Contributing

We welcome contributions to website-starter. Feel free to submit bug reports, feature requests, or pull requests on our GitHub repository.

License

This project is licensed under the MIT License.