Forestry.io Website is an open-source Hugo + Gulp boilerplate that was used to build the Forestry.io documentation, blog, and marketing site. It combines the Hugo static site generator with a Gulp asset pipeline, giving you a production-ready foundation for building fast content sites.
What is the Forestry.io Website?
The Forestry.io Website is a starter repository that wraps Hugo with Gulp as an asset pipeline, compiling CSS, SCSS, JavaScript, and images into a deployable static site. It takes Markdown content from the hugo/content/ directory and source files from src/, then outputs a production build to dist/. The project runs on Node (with NPM) and was originally developed by the Forestry.io team for their own website.
Key Features
This boilerplate bundles the following build tools and integration points directly into the template:
- Hugo static site generation — Hugo builds the site from content, data, layouts, and shortcodes stored under
hugo/, with site-wide settings inconfig.toml. - Gulp asset pipeline — Automates CSS and JS compilation, image optimization, SVG sprite generation, and local development tasks through
gulpfile.babel.js. - PostCSS + Webpack + Babel — PostCSS processes CSS from
src/css/andsrc/scss/, while Webpack with Babel compiles ES6 JavaScript fromsrc/js/; configuration lives inpostcss.config.jsandwebpack.config.js. - ImageMin image optimization — Images in
src/img/are optimized and compressed intohugo/static/img/for use in layouts and content. - SVG Sprite generation — SVGs in
src/img/are combined into a single sprite athugo/static/svg/sprite.symbol.svg, referenced via a Hugo partial. - BrowserSync local development —
npm startlaunches a development server athttp://localhost:3000/with live CSS/JS injection and automatic page reloads;npm run previewserves the production build. - Algolia search integration — Custom Hugo output formats generate an Algolia index (
list.algolia.json) and an OpenSearch definition (list.opensearch.xml) for any section configured in front matter. - Code quality tooling — ESLint, StyleLint, and Prettier configurations are included, with
npm run eslintandnpm run stylelintcommands plus:fixvariants.
Who should use the Forestry.io Website?
Three groups get the most out of this repository:
- Hugo developers — Use this as a reference or starter for building documentation sites, blogs, or marketing pages that need a modern asset pipeline without a heavy front-end framework.
- Forestry/CMS users — Understand how the Forestry.io website is structured and how to keep compiled CSS/JS committed so the site works with content management systems.
- Static site beginners — Learn how Hugo, Gulp, PostCSS, Webpack, and BrowserSync fit together in a working production codebase.
Use cases
You can repurpose this template for several concrete workflows:
- Documentation maintainers: Add Algolia-powered search to any Hugo section by putting
outputs: algoliaandoutputs: opensearchin front matter; the included layouts generate the search index and browser-discoverable search definition. - S3 deployers: Generate a valid S3 redirects configuration by adding
outputs: redirectsto a section's front matter, using Hugo aliases plus the customRedirectsoutput format. - Front-end developers: Write JS with
require()/importinsrc/js/, use SCSS or plain CSS imports, and let the build optimize images and produce an SVG sprite automatically.
How does it work?
After cloning the repository, run npm install to install Hugo and all Node dependencies. Use npm start for local development with BrowserSync at http://localhost:3000/, npm run preview to view the production build locally, and npm run build to generate the production site into dist/. The build is self-cleaning, removing dist/ and .tmp/ on each run to keep output current.
FAQ
Here are quick answers to common questions about this template:
Is the Forestry.io Website free to use?
The repository is publicly available on GitHub, so you can clone it, modify it, and use it as a starting point for your own static site without license fees.
What static site generator does the template use?
It uses Hugo, with Gulp acting as the asset pipeline. Hugo builds the HTML from Markdown content and layouts, while Gulp processes CSS, JavaScript, and images.
How do I start the development server?
Run npm install once, then npm start. This launches a BrowserSync server at http://localhost:3000/ with automatic CSS/JS injection and page reloads when content changes.
Can I add search to my site with this template?
Yes. The template ships with custom Hugo output formats for Algolia and OpenSearch. Adding the relevant outputs values to a section's front matter generates a searchable JSON index and an OpenSearch definition.
Does the template support environment variables?
Yes. Environment variables can be placed in .env.js (use .env.js.stub as a reference). The HUGO_ENV variable is exposed to templates, with values development, production, or staging for Forestry previews.








