More Premium Hugo Themes Premium Hugo Themes

Emacs Easy Hugo

Emacs major mode for managing hugo

Emacs Easy Hugo

Emacs major mode for managing hugo

Author Avatar Theme by masasam
Github Stars Github Stars: 369
Last Commit Last Commit: Jan 6, 2025 -
First Commit Created: Dec 18, 2023 -
default image

Overview

easy-hugo is an Emacs major mode designed for writing Hugo-powered blogs using various markup formats such as Markdown, Org-mode, AsciiDoc, reStructuredText, mmark, and HTML. It enhances the blogging experience within Emacs, making it easier to manage and create content. The mode provides features like switching between multiple blogs, generating different file formats based on user input, previewing articles, and publishing to different deployment destinations.

Features

  • Manage Multiple Blogs: Users can switch between multiple blogs using the < or > key.
  • Create New Articles: Users can create new articles by entering a file name in the minibuffer. A Markdown file is automatically generated for blog creation.
  • Support for Different Markup Formats: Users can write blogs using different markup formats like Markdown, Org-mode, AsciiDoc, reStructuredText, mmark, and HTML.
  • Preview Edited Part: Users can preview the edited part of their blog by pressing p with easy-hugo-mode. The browser opens automatically and displays a preview of the article on the pointer.
  • Preview Drafts: The easy-hugo-server-flags command can be set to -D in order to preview drafts.
  • Publish to Different Deployment Destinations: Users can publish their blog to different deployment destinations like Amazon S3, Google Cloud Storage, and GitHub, based on the settings in their init.el file.
  • Search Blog Articles: Users can search for blog articles using counsel-ag or helm-ag.

Installation

To install easy-hugo, you can follow these steps:

  1. Add the easy-hugo package to your Emacs config:
(use-package easy-hugo
  :ensure t
  :config
  (setq easy-hugo-basedir "~/path/to/your/hugo/blog/")
  (setq easy-hugo-url "your-blog-url")
  (setq easy-hugo-sshdomain "your-blog-ssh-domain")
  (setq easy-hugo-root "/your/root/path")
  (setq easy-hugo-previewtime "300")
  (setq easy-hugo-postdir "content/post")
  (setq easy-hugo-readonly nil) ; This will make the files writable
  )
  1. Restart or reload your Emacs configuration.

Summary

easy-hugo is an Emacs major mode that simplifies the process of writing and managing Hugo-powered blogs within Emacs. It supports multiple markup formats, provides features like blog creation, previewing, and publishing, and integrates seamlessly with different deployment destinations. With easy-hugo, bloggers can enjoy a streamlined workflow and an improved writing experience.