All Projects → indigotree → Atlas

indigotree / Atlas

Licence: mit
The Hugo boilerplate we use for our projects.

Projects that are alternatives of or similar to Atlas

snipcart-hugo-integration
Hugo Website Tutorial with a Live Static E-Commerce Example
Stars: ✭ 38 (-83.62%)
Mutual labels:  static-site-generator, hugo, netlify, jamstack
trailing-slash-guide
Understand and fix your static website trailing slash issues!
Stars: ✭ 255 (+9.91%)
Mutual labels:  static-site-generator, hugo, netlify, jamstack
nuxt-starter-netlify-cms
Example nuxt + netlify cms project. Nuxt port of Gatsby starter app.
Stars: ✭ 13 (-94.4%)
Mutual labels:  static-site-generator, netlify, jamstack
Skeleventy
A skeleton boilerplate built with Eleventy.
Stars: ✭ 318 (+37.07%)
Mutual labels:  netlify, static-site-generator, jamstack
Netlify Statuskit
Netlify StatusKit is a template to deploy your own Status pages on Netlify.
Stars: ✭ 216 (-6.9%)
Mutual labels:  netlify, hugo, jamstack
Gatsby Starter Netlify Cms
Example gatsby + netlify cms project
Stars: ✭ 1,932 (+732.76%)
Mutual labels:  netlify, static-site-generator, jamstack
navigator-hugo
Navigator Business theme powered by Hugo. It also could be used for a personal portfolio.
Stars: ✭ 133 (-42.67%)
Mutual labels:  static-site-generator, hugo, jamstack
Jamstackthemes
A list of themes and starters for JAMstack sites.
Stars: ✭ 298 (+28.45%)
Mutual labels:  netlify, hugo, jamstack
Headlesscms.org
Source for headlesscms.org
Stars: ✭ 628 (+170.69%)
Mutual labels:  netlify, static-site-generator, jamstack
Wowchemy Hugo Modules
🔥 Hugo website builder, Hugo themes & Hugo CMS. No code, build with widgets! 创建在线课程,学术简历或初创网站。
Stars: ✭ 6,093 (+2526.29%)
Mutual labels:  netlify, static-site-generator, hugo
Bael Template
Brutalist Blog theme for Netlify CMS
Stars: ✭ 187 (-19.4%)
Mutual labels:  netlify, static-site-generator, jamstack
Next Js Blog Boilerplate
🚀 Nextjs Blog Boilerplate is starter code for your blog based on Next framework. ⚡️ Made with Nextjs, TypeScript, ESLint, Prettier, PostCSS, Tailwind CSS.
Stars: ✭ 134 (-42.24%)
Mutual labels:  netlify, static-site-generator, jamstack
persian-hugo
Persian is a box design personal blog theme based on Bootstrap and powered by Hugo. It is very responsive and perfectly fits on any sized screen device.
Stars: ✭ 32 (-86.21%)
Mutual labels:  static-site-generator, hugo, jamstack
influencer-hugo
Influencer is a Hugo theme for book authors and writers. It has also Snipcart supports for order books and payments.
Stars: ✭ 66 (-71.55%)
Mutual labels:  static-site-generator, hugo, jamstack
contentful-hugo
A CLI tool that pulls data from Contentful and turns it into markdown files for Hugo and other static site generators. It also includes an express server that can be used for local development and content previews
Stars: ✭ 31 (-86.64%)
Mutual labels:  static-site-generator, hugo, jamstack
liva-hugo
Liva is a personal blog template powered by Hugo.
Stars: ✭ 192 (-17.24%)
Mutual labels:  static-site-generator, hugo, jamstack
wowchemy-hugo-themes
🔥 Hugo website builder, Hugo themes & Hugo CMS. No code, easily build with blocks! 创建在线课程,学术简历或初创网站。#OpenScience
Stars: ✭ 6,891 (+2870.26%)
Mutual labels:  static-site-generator, hugo, netlify
twenty-twenty-hugo
Twenty Twenty Hugo is forked from WordPress Twenty Twenty theme. It's fully functional like the WordPress theme.
Stars: ✭ 48 (-79.31%)
Mutual labels:  static-site-generator, hugo, jamstack
Eleventy Netlify Boilerplate
A template for building a simple website with the Eleventy static site generator
Stars: ✭ 359 (+54.74%)
Mutual labels:  netlify, static-site-generator, jamstack
Hugo Boilerplate
A Hugo boilerplate for building modern websites
Stars: ✭ 58 (-75%)
Mutual labels:  static-site-generator, hugo, jamstack

Atlas, Hugo Boilerplate

Atlas

The Hugo boilerplate we use for our projects.

Disclaimer - This boilerplate has been heavily integrated with Netlify, and therefore many features are specific to the Netlify platform and may not work with other hosting providers.

Disclaimer - Atlas is a boilerplate (starter kit) for bespoke Hugo projects. It's not a Hugo theme and cannot be placed inside the /themes directory. Check the theme docs for more information.

Features

Atlas provides the following features out of the box:

  • Pre configured support for Hugo Pipes, with SASS and Autoprefixer
  • Environment driven robots.txt file (disallows robots on everything other than production)
  • Base HTML templates with easy customisation/extension
  • Configuration for Netlify deployments
  • Better defaults for configuring HTTPS
  • Better redirects with Netlify instead of <meta http-equiv="refresh">

Prerequisite

Atlas does not include a copy of the hugo binary. You will need to install Hugo first you can run any of the commands mentioned below. It does however include a Hugo version number as part of the netlify.toml file to specify the version of Hugo to use when building on Netlify.

Getting Started

To get started, you can either clone the repository, or deploy straight to Netlify. Then run the following from the project root:

npm install
npm run server

Available Commands

There are 3 commands available:

  • npm run build - Builds assets (sass, js, fonts, images) and runs hugo
  • npm run build:preview - The same as build, but runs hugo --buildDrafts --buildFuture
  • npm run server - Runs BrowserSync and watches for changes, running build when changes are detected

Robots.txt

A default robots.txt can be found at /layouts/robots.txt which is configured to disallow crawlers when the HUGO_ENV environment variable is not set to "production".

The default behaviour is to disallow search engines on "branch" deployments. If you're using split testing, you will need to modify the default robots.txt template to ensure your branch deployments can be indexed.

Functions

Atlas has netlify-lambda installed out of the box to make working with Netlify Functions that much easier. Functions should be made inside src/lambda and should end in the .js extension. They will be compiled into /functions where Netlify will recognise them and deploy them automatically.

Here is an example that you can start from:

exports.handler = (event, context, callback) => {
    callback(null, {
        statusCode: 200,
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            message: "Hi from Lambda."
        })
    });
}

Headers

Headers can be configured within /layouts/index.headers, which is then built to /public/_headers.

This is a Netlify feature. Learn more about Headers with Netlify.

Security Headers

Atlas comes with some default headers to help you better protect your site. The default headers we include are: X-Frame-Options, X-XSS-Protection, X-Content-Type-Options, Referrer-Policy.

These headers are configured with the following values:

X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Referrer-Policy: origin-when-cross-origin

Redirects

Redirect rules can be appended to /layouts/index.redirects, which is then built to /public/_redirects.

This is a Netlify feature. Learn more about Netlify Redirects.

Aliases

Hugo Aliases are usually handled by <meta http-equiv="refresh" ...> tags. These have been disabled within config.toml with disableAliases = true, and instead are handled by Netlify Redirects. This is handled automatically and you should continue to add aliases as described in the Hugo documentation.

Themes

Atlas is a boilerplate (starter kit) designed to aid bespoke Hugo development. Using existing themes with Atlas is possible, but unsupported.

Atlas files will take priority over your theme due to the order Hugo looks for files. For this reason, you will have to remove most of the files inside /layouts with the exception of _headers, _redirects and robots.txt.

If you wish the develop your site as a theme inside Atlas, you can copy /layouts into your theme and update the references within the gulpfile.babel.js.

File Structure

│   │
|   └──── /assets            - Source files for assets (SASS, JS, Images, Fonts etc)
│
└──── /layouts               - Template files
│   │ 404.html               - 404 Template
│   │ index.headers          - Custom Netlify HTTP headers
│   │ index.redirects        - Custom Netlify redirect rules
│   │ robots.txt             - Template for robots.txt
│   │
│   └──── /_default          - Base templates for list & singular pages
│   │   │ baseof.html        - Base template
│   │   │ list.html          - List/taxonomy template
│   │   │ single.html        - Singular page/post template
│   │
│   └──── /partials          - Partials
│       │
│       └──── /site          - Site partials loaded into _default/baseof.html template
│           │ meta.html      - Site <meta> tags
│           │ header.html    - Sites primary <header>
│           │ footer.html    - Sites primary <footer>
│           │ scripts.html   - JavaScript <script> referenced before closing </body>
│           │ styles.html    - Stylesheets referenced before closing </head>
│   │
│   └──── /static            - Hugo static resources
│
│ .gitignore
│ LICENSE
│ README.md
│ config.toml                - Hugo configuration
│ postcss.config.js          - PostCSS configuration for Hugo Pipes
│ netlify.toml               - Netlify configuration
│ package.json

Deploy to Netlify

You can deploy directly to Netlify using this button:

Deploy to Netlify

License

MIT © Indigo Tree

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].