Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zero-md-docs

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zero-md-docs

Instantly publish markdown from Github docs folder

  • 1.0.0-next.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

zero-md-docs

Instantly publish markdown from Github docs folder

Elegantly leverage your Github docs/ folder to host a Github Pages static site using just markdown files. This gives a clean experience for your users: users can view nicely formatted docs from both the Github UI, and from your public-facing static site, synchronised. Edits are published immediately without a rebuild, and you avoid polluting your git history with tons of commits.

Features:

  • Install once, use forever
  • Single page app
  • Zero-config

Inspired by docsify!

Usage

Structure your docs

Setup docs/ folder like so:

.
└── docs/
    ├── readme.md               # Homepage (always named `readme.md`)
    ├── index.html              # Copy from template
    ├── getting-started.md      # Another page
    └── configuration.md        # Yet another page

Create index.html

Copy and paste the following index.html into docs/ folder:

<!-- index.html -->
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <!-- Define site links -->
    <script>
      window.ZeroMdDocsConfig = {
        links: [
          ['Home', 'readme.md'],
          ['Getting Started', 'getting-started.md'],
          ['Configuration', 'configuration.md'],
          ['External Link Example', 'https://example.com']
        ]
      }
    </script>

    <!-- Import `zero-md` -->
    <script type="module" src="https://cdn.jsdelivr.net/npm/zero-md@3"></script>

    <!-- Import `zero-md-docs` -->
    <script type="module" src="https://cdn.jsdelivr.net/npm/zero-md-docs@1"></script>

    <!-- Import default stylesheet -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zero-md-docs@1/dist/default.css" />
  </head>
  <body>
    <div id="app"></div>
  </body>
</html>

Publish with Github Pages

From your Github repo page, go to Setting > Pages > Source > Deploy from a branch, then select /docs folder.Save! Your site is now available at https://<username>.github.io/<repo>/.

License

ISC

Keywords

FAQs

Package last updated on 18 Mar 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc