1.0.22 • Published 9 months ago

tinymdserv v1.0.22

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

TinyMDServ

TinyMDServ is a lightweight Markdown server designed for rapid deployment of Markdown-based documentation. It allows you to host your Markdown files with minimal configuration and includes simple templating capabilities.

Features

  • Markdown Rendering: Automatically converts .md files into HTML, making it easy to host documentation.
  • Custom Templates: Supports custom templates using EJS to style your content.
  • Search Functionality: Basic search template for navigating between different documentation pages.
  • Port Customization: Allows specifying a custom port and document root directory.
  • Cross-Platform Support: Works seamlessly across Windows, macOS, and Linux environments.

Installation

  • Install TinyMDServ globally via npm:

    npm install -g tinymdserv

Usage

  1. Create a Homepage: Create a docs/index.md file as your homepage.

    # Home
    
    Hello
  2. Create Custom Templates: Define templates using EJS for your document pages.

    • Main Template: docs/template.ejs

      <html>
      <head>
        <meta charset="utf-8" />
        <meta lang="en" />
        <title><%=title %></title>
      </head>
      <body>
        <%-content %>
      </body>
      </html>
    • Search Template: docs/search.ejs

      <html>
      <head>
      <meta charset="utf-8" />
      <meta lang="en" />
      <title><%=title %></title>
      </head>
      <body>
        <ul>
        <% content.forEach(path => { %>
          <li><a href='<%-path %>'><%-path %></a></li>
        <% }) %>
        </ul>
      </body>
      </html>
  3. Run the Server: Start the server by specifying an optional port number and document root path.

    tinymdserv [<port_number>] [<docs_full_path>]
    • Default port number is 80.
    • Default document path is ./docs.

Examples

  • Run on port 80 (default port):

    tinymdserv 80
  • Run on port 80 with a specific document directory:

    tinymdserv 80 C:\docs
  • Run using node directly (alternative method):

    node app.js 8080 ./docs

Release Notes

  • v1.0.22
    • Fix math expression escaping for backslash and underscore.
  • v1.0.13
    • Add pagination for presentation mode.
  • v1.0.9
    • Add page auto-update.
  • v1.0.0
    • Initial release.
1.0.22

9 months ago

1.0.21

10 months ago

1.0.19

11 months ago

1.0.18

12 months ago

1.0.16

12 months ago

1.0.20

11 months ago

1.0.15

1 year ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago