Skip to content

Harugo CLI - An interactive CLI for building themed Next.js static sites. Choose pages, components, and themes to create your unique site. Star to support our work!

License

Notifications You must be signed in to change notification settings

devnyxie/harugo-ssg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

This project is currently under active development.

Harugo 🏮

Harugo is a Go-built Command Line Interface (CLI) tool that simplifies creating static websites. It guides you through an interactive setup process and leverages a customized Next.js base for your project. Harugo shines with its dynamic component replacement, allowing themes to overhaul existing components for ultimate design control.

Harugo CLI

Harugo CLI guides you through creating your static website. You will be able to interactively create pages, choose components, and select themes.

Once you launch the CLI, you will be able to:

  • Create Pages:
  • Select any Components for these pages
  • Select a Theme

Once you confirm, a Harugo-customized Next.js base will be created and configured for you.

Harugo-customized Next.js base

The Harugo-customized Next.js base includes the following features:

  • YAML Config load
    • site_config.yaml: Is generated by the CLI, it includes data like project name, all pages' URLs, components, and more.
    • user_config.yaml: Is created but you must fill it yourself. Consists of data like name & surname, social platforms, and profile picture.
  • Useful Utils: For example, date formatting, Markdown-to-HTML, code highlighting.
  • Customization: In Harugo, customization is not just about background colors and different fonts. Themes can change the code of any selected component thanks to the Dynamic Component Replacement feature. Perhaps you don't like the Navbar? Simply define your version of the Navbar in the theme, and the modified version will be rendered instead! Cool, isn't it?
// Example of Dynamic Component Replacement in theme.js
const ModifiedBlogComponent = ({ data }) => {
  return (
    <>
      <h1>Modified Blog</h1>
    </>
  );
};

const theme = {
  dark: true,
  light: true,
  themedComponents: {
    blog: ModifiedBlogComponent, //<-- "blog" here is the unique identifier of the core Blog component. You can find identifiers in each main file of the core component.
  },
};

Contribution 🌱

Want to help make Harugo awesome?

  • Design custom themes
  • Customize existing components ️
  • Submit pull requests with your improvements!

About

Harugo CLI - An interactive CLI for building themed Next.js static sites. Choose pages, components, and themes to create your unique site. Star to support our work!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published