You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

42 lines
862 B

package main
import (
"github.com/spf13/cobra"
"github.com/yuin/goldmark"
emoji "github.com/yuin/goldmark-emoji"
meta "github.com/yuin/goldmark-meta"
"github.com/yuin/goldmark/extension"
"github.com/yuin/goldmark/parser"
)
var (
rootCmd = &cobra.Command{
Use: "mder",
Short: "mder is a very fast static site generator",
}
markdown = goldmark.New(
goldmark.WithParserOptions(parser.WithAutoHeadingID()),
goldmark.WithExtensions(extension.GFM, meta.Meta, emoji.Emoji),
)
)
func init() {
// create a new site folder
rootCmd.AddCommand(initCmd())
// generate static website
rootCmd.AddCommand(deployCmd())
// new post or page
rootCmd.AddCommand(newCmd())
// run serve locally
rootCmd.AddCommand(serveCmd())
// auto update
rootCmd.AddCommand(updateCmd())
}
func main() {
err := rootCmd.Execute()
if err != nil {
panic(err)
}
}