Skip to content

silentiumsi/go-lunr-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Go Lunr generator

Parse markdown and html file to extract yaml front-matter and generate Lunr documents.

Example

Input

---
title: My awesome post
slug: my-awesome-post
url: https://mysite.com/my-awesome-post
tags: just, some, tags
---

# I'm some content written in markdown

Output

[
  {
    "id": "my-awesome-post",
    "title": "My awesome post",
    "url": "https://mysite.com/my-awesome-post",
    "tags": "just, some, tags",
    "content": "\n# I\u0026#39;m some content written in markdown"
  }
]

Note

I am not a Go developer and this was built for a specific purpose and may not fit your needs. Feel free to fork, make more generic, submit merge requests etc.

About

A yaml parser to extract front matter from markdown and html files and generate lunr documents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages