Zola.nvim

Zola.nvim is a Neovim plugin to build, serve, check, and create content for your Zola static sites without ever leaving Neovim.

✨ Why Zola.nvim?

I build most of my personal sites and documentation with Zola, and constantly switching between the terminal and Neovim to run commands disrupted my flow. With zola.nvim, I can:

  • 🛠 Build, serve, and check my Zola sites directly from Neovim with some simple keybindings
  • 📝 Scaffold new pages and sections with sensible TOML front matter by default
  • 🔧 Configure options per command for a streamlined, focused workflow

⚡️ Features at a glance

✅ User commands: :ZolaBuild, :ZolaServe, :ZolaCheck, :ZolaCreatePage, :ZolaCreateSection ✅ Full Lua API for advanced workflows ✅ Dynamic content creation with vim.ui.input() integration ✅ No default keymaps to keep your Neovim lean and fast

🚀 Get Started

Install with lazy.nvim:

{
  'savente93/zola.nvim',
  dependencies = { 'nvim-lua/plenary.nvim' },
  config = function()
    require('zola').setup()
  end
}

💡 Example: Create a new blog post instantly

vim.keymap.set("n", "<leader>znp", function()
  vim.ui.input({ prompt = "Enter page slug: " }, function(result)
    require("zola").create_page({
      slug = "blog/" .. result,
      page_is_dir = true,
      draft = true,
      open = true
    })
  end)
end, { desc = "Create a new blog post" })

Check out the GitHub repo for installation and usage details. I’d love to hear your feedback and ideas for future improvements! (if you're curious, yes, this post was in fact made using Zola.nvim!)