A Hugo boilerplate.
Disclaimer - Artemis is a boilerplate (starter kit) for Hugo projects. It's not a Hugo theme and cannot be placed inside the /themes
directory.
Artemis provides the following features out of the box:
- Base HTML template with site partials to separate style links, script sources, meta tags, and common site components
- Hugo Pipes set to auto-compile, minify, and MD5-hash CSS and JS based on development environment
- PostCSS through Hugo Pipes using Autoprefixer and PurgeCSS
- Google Analytics support through Hugo Templates
- Image optimization using gulp-imagemin
- Basic
netlify.toml
for simple Netlify integration
Artemis does not include a copy of the hugo
binary. You will need to install Hugo Extended first before you begin developing your site.
The Extended version of Hugo is required.
To get started, clone the repository, then fun the following commands from the root directory.
npm install
npm start
To add main site pages run the hugo new
command and create a markdown file in the pages/
directory. Then create a corresponding html
template file in layouts/pages/
Example:
hugo new pages/my-new-page.md
The header.html
partial is configured to generate a main site navigation by utilizing Hugo Menu Templates. The pages.md
archetype sets each page markdown file to the main menu via front matter.
Theere are 4 available Scripts:
npm start
- Runs development server with CSS sourcemaps and drafts enablednpm run preview
- Runs server in production environment with asset minification and postCSS enablednpm run build
- Builds production ready site in public directory with minified/optimized assetsnpm run images
- Runs gulp images task to optimize images in./static/img/
│
└──── /archetypes - Hugo archetypes
│
└──── /assets - Source files for scss and js
│ └─── /js
│ └─── /scss
│
└──── /content - Hugo Content Directory
│ └─── /pages - Markdown files for main site pages
│ |
│ | _index.md - Site homepage markdown file
│
└──── /layouts - Template files
│ └─── /_default
│ |
│ | baseof.html - Base template
│ │
│ └─── /pages - Template files for main site pages
│ │
│ └─── /partials
│ └─── /site - Site partials
│ │
│ │ footer.html - Site primary <footer>
│ │ header.html - Site primary <header>
│ │ meta.html - Site <meta> tags
│ │ scripts.html - JavaScript <script> tags before closing </body>
│ │ styles.html - Stylesheets referenced before closing </head>
│ │
│ │ 404.html - 404 Template
│ │ index.html - Home page
│
└──── /static - Hugo static resources
│ └─── /img - Images directory
│
│ config.yml - Hugo configuration file
│ gulpfile.js - Gulp js file
│ netlify.toml - Netlify configuration file
│ package.json
│ README.md - The README file you're reading right now
MIT © Edy de Leon