Skip to content

Automate batch edits to your Markdown content. Integrates with static website generators such as Hugo and Gatsby

License

Notifications You must be signed in to change notification settings

HugoBlox/awesome-hugo

Repository files navigation

Awesome Hugo

A collection of scripts to help you easily manage your Markdown content.

👉 Questions? Join the community on Discord.

💡 Have you developed a useful script? Consider contributing it in a Pull Request so the community can benefit!

Scripts

  • refactor-pages-to-page-bundles
    • Refactor all Markdown page files to page bundles (each page gets a portable, self contained folder with its assets)
  • refactor_page_bundles_to_pages.sh
    • Convert page bundles (e.g. content/home/hero/index.md) to page files (e.g. content/home/hero.md)
  • refactor_pages_convert_TOML_to_YAML.py
    • Python script to convert front matter of all pages from TOML to YAML for compatibility with a wider range of Markdown editors
    • Prerequisite: pip install pipenv and pipenv install
    • To use cd YOUR_SITE_FOLDER and python3 refactor_pages_convert_TOML_to_YAML.py
  • refactor-widget-bundles-as-headless.sh
    • Refactor Hugo widgets to add headless: true to front matter (assumes YAML front matter, such as by running above Python script to convert all front matter from TOML to YAML)

Notes

Please make a full backup of your site and Markdown content prior to running any scripts.

These scripts are provided by the community in the hope that they might aid updating and managing large collections of Markdown content. Before running a script, you should review its code and adapt it as necessary for your content.

Windows users may need to install the Windows Linux Subsystem in order to run Bash scripts.