kauefraga / pavus

The next-gen markdown tool. Preview markdown, generate from templates and more!
MIT License
10 stars 0 forks source link
cli go markdown markdown-previewer markdown-template readme-template tool

pavus GitHub Release GitHub Last Commit Go Reference

Next-generation markdown tool

Preview your markdown file, generate one from templates and more. Add pavus in your toolchain!

Getting startedInstallationTemplatesContributing

Key Features

Want to know what's coming? Take a look at the roadmap.

Usage

Installation

Check the latest release page to install the prebuilt binary for your platform.

If there is no binary for your platform you can build it yourself, see how to build.

Templates

Mastering the CLI

Reference about the command-line interface: available commands, examples, flags and aliases.

Try pavus --help and pavus help [command].

Available commands
Aliases
Examples
Root command (preview)

Preview a markdown file, in this case, "README.md"

pavus README.md

If no file is passed to pavus, it will automatically look for one

pavus

The flag -o --open-browser can be used to open the preview in your default browser

pavus README.md --open-browser

The flag -a --asset-directory <directory> can be used to specify the assets directory (images and other resources being used in the markdown)

# - README.md
# - public/
#   - demo.gif
#   - header.png
#   - ...

pavus README.md --asset-directory public/
Init command

Create a markdown file based in a template interactively

It'll ask you for a template name and an output file name

pavus init

Looking for flags?

# non-interactive
pavus init --template "tooling" --output "my-docs.md"

# shorthand flags
pavus init -t tooling -o my-docs.md

# fill the missing extension (.md) and only prompts for the template name
pavus init -o my-docs
Templates command

List pavus available markdown templates

pavus templates

Mastering the configs

Contributing

Feel free to contribute opening an issue to report a bug or suggesting a CLI change, an improvement or a feature.

How to contribute

  1. Fork this project
  2. Clone your fork on your machine
  3. Setup the dev environment
  4. Make your changes and commit them following conventional commits
  5. Run git push to sync the changes
  6. Open a pull request specifying what you did

How to setup dev environment

Install the dependencies

go mod download

And/or just run the project

go run cmd/main.go

How to build

With Go installed, building pavus should be as easy as running the following command

go build cmd/main.go -o pavus

However, running the command below should generate a more lightweight binary

CGO_ENABLED=0 go build -ldflags='-w -s' cmd/main.go -o pavus

In the build.sh you can see how the release binaries are being built.

License

This project is licensed under the MIT License - See the LICENSE for more information.


Se você gostou do projeto e ele te ajudou, considere me apoiar um café ☕ 🇧🇷