Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
h-enk committed Apr 15, 2020
0 parents commit 67f0a6e
Show file tree
Hide file tree
Showing 109 changed files with 8,637 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 1
update_configs:
- package_manager: javascript
directory: /
update_schedule: live
allowed_updates:
- match:
update_type: security
automerged_updates:
- match:
dependency_type: all
update_type: in_range
version_requirement_updates: widen_ranges
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
assets/js/vendor
node_modules
30 changes: 30 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"no-console": 0,
"quotes": ["error", "single"],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore"
}
]
}
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
functions
node_modules
public
resources
yarn-error.log
3 changes: 3 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
assets/scss/common/_syntax.scss
assets/scss/vendor
node_modules
34 changes: 34 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"extends": "stylelint-config-standard",
"rules": {
"no-empty-source": null,
"string-quotes": "double",
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"extend",
"at-root",
"debug",
"warn",
"error",
"if",
"else",
"for",
"each",
"while",
"mixin",
"include",
"content",
"return",
"function",
"tailwind",
"apply",
"responsive",
"variants",
"screen"
]
}
]
}
}
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
dist: xenial
sudo: required

language: node_js
node_js:
- "lts/*"

install:
- wget "https://github.com/gohugoio/hugo/releases/download/v${HUGO_RELEASE}/hugo_extended_${HUGO_RELEASE}_Linux-64bit.deb"
- sudo dpkg -i hugo*.deb
- yarn install

script:
- hugo version
- yarn test
- yarn clean
- yarn build

env:
global:
- PRODUCTION=true
- HUGO_RELEASE=0.60.1
76 changes: 76 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.2.1] - 2020-03-31
### Added
- version to package.json - [issue 23](https://github.com/h-enk/hyas/issues/23)
- `copy:deps` to build command - [issue 22](https://github.com/h-enk/hyas/issues/22)
- `clean:deps` command

## [1.2.0] - 2020-03-30
### Added
- ga-lite - [issue 15](https://github.com/h-enk/hyas/issues/15)
- copy script for dep resources - [issue 14](https://github.com/h-enk/hyas/issues/14)
- flag `--minify` to `build` command

### Changed
- Bumped `[build.environment]` `netlify.toml`
- Bumped dependencies `package.json`
- Update security headers - [issue 17](https://github.com/h-enk/hyas/issues/17)
- `README.md`
- `robots` tag logic in `seo.html`

### Removed
- favicon - [issue 12](https://github.com/h-enk/hyas/issues/12)

## [1.1.0] - 2020-02-06
### Added
- `<link rel="shortcut icon" href="/path/to/favicon.ico">` - [issue 12](https://github.com/h-enk/hyas/issues/12)
- breadcrumbList structured data - [issue 11](https://github.com/h-enk/hyas/issues/11)
- body classes - [issue 10](https://github.com/h-enk/hyas/issues/10)
- `.stylelintignore` - [issue 9](https://github.com/h-enk/hyas/issues/9)
- `.eslintignore` - [issue 8](https://github.com/h-enk/hyas/issues/8)

### Changed
- default theme - [issue 7](https://github.com/h-enk/hyas/issues/7)
- bumped dependency `lazysizes` to `^5.2`
- bumped dependency `HUGO_VERSION` to `0.63.2`

## [1.0.1] - 2019-12-20
### Added
- custom `layouts/rss.xml` with page option `feed_exclude: true` - [issue 5](https://github.com/h-enk/hyas/issues/5)
- content `'./content/**/*.md',` to `postcss.config.js` - [issue 2](https://github.com/h-enk/hyas/issues/2)

### Changed
- set `canonifyURLs = false` in `/config/production/config.toml` and `/config/staging/config.toml` - [issue 3](https://github.com/h-enk/hyas/issues/3)

### Removed
- `--minify` in `build` command `package.json` - [issue 4](https://github.com/h-enk/hyas/issues/4)

## [1.0.0] - 2019-12-11
### Added
- [Layouts](https://github.com/h-enk/hyas/tree/master/layouts)
- [Image](https://github.com/h-enk/hyas/blob/master/layouts/shortcodes/img.html) shortcode
- [Directories](https://github.com/h-enk/hyas#theme-structure)
- [Scripts](https://github.com/h-enk/hyas/blob/master/package.json)
- bootstrap 4.4.1
- @fullhuman/postcss-purgecss 1.3.0
- purgecss-whitelister 2.4.0
- eslint 6.7.2
- stylelint 12.0.0
- stylelint-config-standard 19.0.0
- rimraf 3.0.0
- lazysizes 5.2.0-beta1
- [Atlas](https://github.com/indigotree/atlas), Copyright (c) 2017 Indigo Tree, [MIT License](https://github.com/indigotree/atlas/blob/master/LICENSE)

[Unreleased]: https://github.com/h-enk/hyas/compare/v1.2.1...HEAD
[1.2.1]: https://github.com/h-enk/hyas/releases/tag/v1.2.1
[1.2.0]: https://github.com/h-enk/hyas/releases/tag/v1.2.0
[1.1.0]: https://github.com/h-enk/hyas/releases/tag/v1.1.0
[1.0.1]: https://github.com/h-enk/hyas/releases/tag/v1.0.1
[1.0.0]: https://github.com/h-enk/hyas/releases/tag/v1.0.0
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Henk Verlinde

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
139 changes: 139 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Hyas
[![GitHub release](https://img.shields.io/github/release/h-enk/hyas.svg?style=flat-square)](https://github.com/h-enk/hyas/releases)
[![Build Status](https://img.shields.io/travis/h-enk/hyas.svg?style=flat-square)](https://travis-ci.org/h-enk/hyas)
[![Netlify](https://img.shields.io/netlify/895a161c-86be-48a2-8c57-a8c5d68cd1a4?style=flat-square)](https://hyas.netlify.com/)

Hugo boilerplate helping you build fast, robust, and adaptable websites.

## Features

- Bootstrap Sass (no JavaScript) and Autoprefixer
- Check Sass and JavaScript for errors
- Environment specific configuration
- Image shortcode with [lazysizes](https://github.com/aFarkas/lazysizes) and [blur up](https://github.com/aFarkas/lazysizes/tree/master/plugins/blur-up) plugin
- Fingerprinting and [SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) (production)
- Remove unused CSS (production)

## Requirements

Make sure all dependencies have been installed:

- Hugo >= 0.68.3/extended
- Node.js >= 13.11.0
- npm >= 6.13.7
- Yarn >= 1.22.0 (recommended)

## Getting started

Create a new Hyas project:

```bash
$ git clone [email protected]:h-enk/hyas.git my-hyas-site
```

Install dependencies:

```bash
# @ my-hyas-site/
$ yarn install
```

Build development theme with live reloading and injection:

```bash
# @ my-hyas-site/
$ yarn start
```

### Other commands
- `yarn lint:styles` - Check Sass for errors
- `yarn lint:scripts` - Check JavaScript for errors
- `yarn clean` - Delete temporary directories
- `yarn build` - Build production theme

## Theme structure

```shell
my-hyas-site/ # → Root of your Hyas based theme
├── archetypes/ # → Content template files
├── assets/ # → Asset files (fonts, images, js, lambda, and sass)
├── config/ # → Configuration directives
│ ├── _default/ # → Development and defaults
│ ├── production/ # → Production specific
│ ├── staging/ # → Staging specific
│ ├── postcss.config.js # → PostCSS configuration file
├── content/ # → Content using page bundles
├── data/ # → Custom data files
├── functions/ # → Netlify lambda functions directory (production)
├── layouts/ # → Template files
│ ├── _default/ # → Base templates for list & singular pages
│ ├── partials/ # → Partials (footer, head, header, and sidebar)
│ ├── shortcodes/ # → Shortcodes (img)
│ │── 404.html # → 404 Template
│ │── index.headers # → Custom Netlify HTTP headers
│ │── index.html # → Homepage template
│ │── index.redirects # → Custom Netlify redirect rules
│ │── robots.txt # → Template for robots.txt
│ │── sitemap.xml # → Custom sitemap template
├── node_modules/ # → Node.js packages (never edit)
├── public/ # → Publish directory (temporary)
├── resources/ # → Resource cache directory (temporary)
├── static/ # → Static content (favicons et cetera)
├── .eslintrc.json # → ESLint configuration
├── .stylelintrc.json # → stylelint configuration
├── netlify.toml # → Netlify configuration
├── package.json # → Node.js dependencies and scripts
└── yarn.lock # → Yarn lock file (never edit)
```

## Theme setup
Edit files in `config/` directory.


## Theme development
### Sass

Don't like Bootstrap? Remove it:
```bash
# @ my-hyas-site/
$ yarn remove bootstrap
```
Also make sure to update your sass files, like `app.scss`.

### Images

Use the image shortcode:
```
{{< img src="image-in-page-bundle.jpg" alt="Text description image" caption="Caption, optional" class="wide" >}}
```

Configuration in `config/_default/params.toml`:

```toml
quality = 85
bgColor = "#fff"
landscapePhotoWidths = [900, 700, 500]
portraitPhotoWidths = [1500, 1000, 750]
lqipWidth = "20x"
```

### Sitemap
Exclude a page by adding the following front matter variable:
```yaml
sitemap_exclude: true
```
### Robots
Add a custom [robots meta tag](https://developers.google.com/search/reference/robots_meta_tag) by adding the following front matter variable:
```yaml
robots: "noindex, noarchive"
```
This will output:
```html
<meta name=robots content="noindex, noarchive">
```

## Documentation
- [Hugo](https://gohugo.io/documentation/)
- [Goldmark](https://github.com/yuin/goldmark/)
11 changes: 11 additions & 0 deletions archetypes/blog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "{{ replace .Name "-" " " | title }}"
description: ""
lead: ""
date: {{ .Date }}
draft: true
images: [""]
authors: [""]
---

{{< img src="" alt="" caption="" class="wide" >}}
7 changes: 7 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "{{ replace .Name "-" " " | title }}"
description: ""
date: {{ .Date }}
draft: true
images: [""]
---
Loading

0 comments on commit 67f0a6e

Please sign in to comment.