A Neovim plugin for automated Markdown front matter generation and management.
- Generate Front Matter: Generate YAML front matter for Markdown documents.
- Generate metadata by llm: Use llm to generate metadata(title, description, tags)
- Intelligent Formatting:
- Auto-generated slugs in kebab-case from filenames
- Categories derived from parent directory name
- ISO 8601 compliant dates with timezone information
2.1 Using packer.nvim
use {
'gitsang/markdown-front-matter.nvim',
opts = {},
}2.2 Using lazy.nvim
{
'gitsang/markdown-front-matter.nvim',
opts = {}
}opts = {
llm = {
provider = "openai",
providers = {
["openai"] = {
base_url = "https://api.openai.com/v1",
-- api_key = "YOUR_API_KEY",
api_key = function()
-- function to get your API key
return os.getenv("OPENAI_API_KEY")
end,
model = "gpt-3.5-turbo",
}
}
}
}The plugin provides a simple command to generate or update front matter:
:MarkdownFrontMatterFor detailed documentation, please refer to :help markdown-front-matter within Neovim or view the documentation file.
- Configurable timezone
- Customizable fields
- Auto update on save
Contributions are welcome! Please feel free to submit a Pull Request.
