Skip to content

simple tool for rawdogging your markdown to styled html blog

License

Notifications You must be signed in to change notification settings

dwiandhikaap/rawdog-md

Repository files navigation

demo

rawdog-md

Caveman-level simple, Markdown-to-HTML static site tooling with minimal configuration.

Inspired by motherfuckingwebsite.com, uses Go Template and HTML under the hood.

✨ Features

  • Easy to setup, customize, and deploy quickly.
  • No bloated dependencies/framework code.
  • Minification for HTML, CSS, JS, SVG, JSON, and XML
  • Supports syntax highlighting WITHOUT JavaScript with customizable CSS.
  • Supports embedding YouTube, Twitter, and Bilibili videos out of the box.
  • Live reload server for local development.
  • Various starter template to get going immediately

👍 You might want to use this if:

  • You want to focus on creating your site instead of learning the tool.
  • You want to build websites with Markdown and custom HTML/CSS.
  • You prefer a simple setup without unnecessary installations.

🔑 Core Concepts

  • Minimal Config: rawdog-md is designed to be used with minimal configuration. Choose a starter template and immediately start writing your posts in markdown.
  • Opiniated: This tool is not meant to be a general purpose static site generator. It is meant to be used for a very specific use case, which is a static site with a few simple templated pages. If you want something more general purpose and more advanced, check out Hugo or Jekyll.
  • Bring your own styling: rawdog-md provides the minimal styling. However, it is very easy to adjust as it is just a plain CSS and HTML file.
  • Cross platform: You can use it on Windows, Linux and MacOS.

💻 Installation

rawdog-md is available on Windows, Linux and MacOS. You can install it via package managers, manually, or build it from source.

Windows

Install via PowerShell (Click to expand)
  1. Open PowerShell as Administrator
  2. Run this command
    Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
    iex (irm https://raw.githubusercontent.com/dwiandhikaap/rawdog-md/main/.installer/powershell/install.ps1)
  3. Done! You can now use it as rawd command in your terminal.
Install via Scoop
  1. Install Scoop
  2. Install rawdog-md
    scoop install https://raw.githubusercontent.com/dwiandhikaap/rawdog-md/main/.installer/scoop/rawdog-md.json
  3. Done! You can now use it as rawd command in your terminal.

How to uninstall:

scoop uninstall rawdog-md
Install manually
  1. Go to the latest release page
  2. Download the one with rawd-{version}-windows-amd64.zip filename
  3. Extract the zip file anywhere you like
  4. Add the extracted folder to your PATH. If you don't know how, check out this guide
  5. Done! You can now use it as rawd command in your terminal.

Linux

Install via Bash (Click to expand)
  1. Run this command in your terminal
    curl -fsSL https://raw.githubusercontent.com/dwiandhikaap/rawdog-md/main/.installer/bash/install.sh | bash
  2. Done! You can now use it as rawd command in your terminal.
Install manually
  1. Go to the latest release page
  2. Copy the URL of the one with rawd-{version}-linux-{architecture}.tar.gz filename
  3. Run this command in your terminal
    wget {copied-url} -O rawd.tar.gz
    tar -xvf rawd.tar.gz
    sudo mv rawd /usr/local/bin
    rm rawd.tar.gz
  4. Done! You can now use it as rawd command in your terminal.

MacOS

Install via Bash (Click to expand)
  1. Run this command in your terminal
    curl -fsSL https://raw.githubusercontent.com/dwiandhikaap/rawdog-md/main/.installer/bash/install.sh | bash
  2. Done! You can now use it as rawd command in your terminal.
Install manually
  1. Go to the latest release page
  2. Copy the URL of the one with rawd-{version}-darwin-{architecture}.tar.gz filename
  3. Run this command in your terminal
    wget {copied-url} -O rawd.tar.gz
    tar -xvf rawd.tar.gz
    sudo mv rawd /usr/local/bin
    rm rawd.tar.gz
  4. Done! You can now use it as rawd command in your terminal.

Build from source

Build using Go (Click to expand)
  1. Install Go

  2. Install rawdog-md

    go install github.com/dwiandhikaap/rawdog-md

    ⚠ This will install the binary as rawdog-md instead of rawd if you want to change it to rawd, you can rename the binary file in your Go bin directory.

    See this reference for more information about go install.

  3. Done!

🚀 Usage

  1. Create a new project and choose a preset template

    rawd init

    It will ask you for the project name and the template you want to use.

  2. Then, go to the project directory

    cd <your-project-name>
  3. Start the development server

    rawd watch
  4. Open your browser and go to http://localhost:3000

  5. To create a new post, create a new file in the pages directory. You can use Markdown, Go Template, or HTML.

  6. To edit the template, go to the template directory.

  7. Each time you save your changes, the server will rebuild the site and refresh the browser.

  8. When you're done, build the site

    rawd build

🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.