portails/content/docs/prologue/introduction.md

105 lines
2.8 KiB
Markdown
Raw Normal View History

2020-04-15 15:48:16 +02:00
---
title: "Introduction"
2020-11-04 08:26:58 +01:00
description: "Introduction Hyas."
lead: "Hyas is a Hugo starter helping you build modern websites that are secure, fast, and SEO-ready — by default."
date: 2020-10-06T08:48:57+00:00
lastmod: 2020-10-06T08:48:57+00:00
2020-04-15 15:48:16 +02:00
draft: false
2020-11-04 08:26:58 +01:00
images: []
2020-04-15 15:48:16 +02:00
menu:
docs:
parent: "prologue"
weight: 010
toc: true
---
2020-11-04 08:26:58 +01:00
## Why Hyas?
2020-04-15 15:48:16 +02:00
2020-11-04 08:26:58 +01:00
Six reasons why you should use Hyas:
2020-04-15 15:48:16 +02:00
2020-11-04 08:26:58 +01:00
1. __Security aware__. Get A+ scores on [Mozilla Observatory](https://observatory.mozilla.org/analyze/hyas.netlify.app) out of the box. Easily change the default Security Headers to suit your needs.
2. __Fast by default__. Get 100 scores on [Google Lighthouse](https://googlechrome.github.io/lighthouse/viewer/?gist=8b7aec005ae7b9e128ad5c4e2f125fea) by default. Hyas removes unused css, prefetches links, and lazy loads images.
3. __SEO-ready__. Use sensible defaults for structured data, open graph, and Twitter cards. Or easily change the SEO settings to your liking.
4. __Development tools__. Code with confidence. Check styles, scripts, and markdown for errors and fix automatically or manually.
5. __Bootstrap framework__. Build robust, flexible, and intuitive websites with Bootstrap. Or use any other front-end framework if you prefer.
6. __Netlify-ready__. Deploy to Netlify with sensible defaults. Easily use Netlify Functions, Netlify Redirects, and Netlify Headers.
## Prerequisites
2020-04-15 15:48:16 +02:00
2020-04-17 11:15:31 +02:00
Make sure all dependencies have been installed:
2020-04-15 15:48:16 +02:00
2020-11-04 08:26:58 +01:00
- [Hugo](https://gohugo.io/) >= 0.75.1/extended
- [Node.js](https://nodejs.org/) >= 14.12.0
- [Yarn](https://yarnpkg.com/) >= 1.22.5 (recommended)
{{< alert icon="💡" text="npm (comes with Node.js) and Yarn are both Node.js package managers. <a href=\"https://classic.yarnpkg.com/en/\">Yarn</a> is faster, more reliable, and more secure than npm." >}}
2020-04-15 15:48:16 +02:00
2020-04-17 11:15:31 +02:00
## Get started
2020-04-15 15:48:16 +02:00
2020-11-04 08:26:58 +01:00
Three ways to get started.
### Hyas CLI
Install the Hyas CLI globally:
2020-04-15 15:48:16 +02:00
```bash
2020-11-04 08:26:58 +01:00
yarn add global @hyas/cli
```
Create a new Hyas project:
```bash
hyas create [dir]
```
#### npx
Or use [npx](https://nodejs.dev/learn/the-npx-nodejs-package-runner):
```bash
npx @hyas/cli create my-hyas-site
```
See also: [Hyas CLI]({{< ref "hyas-cli" >}}).
### Repository clone
Create a new Hyas project:
```bash
git clone git@github.com:h-enk/hyas.git my-hyas-site
2020-04-15 15:48:16 +02:00
```
Install dependencies:
```bash
2020-11-04 08:26:58 +01:00
yarn install
2020-04-15 15:48:16 +02:00
```
2020-11-04 08:26:58 +01:00
Start local development server:
2020-04-15 15:48:16 +02:00
```bash
2020-11-04 08:26:58 +01:00
yarn start
2020-04-15 15:48:16 +02:00
```
2020-11-04 08:26:58 +01:00
See also: [commands]({{< ref "commands" >}}).
### Netlify deploy
Get your Hyas site in 1 min.
<a class="btn btn-primary btn-sm px-3" href="https://app.netlify.com/start/deploy?repository=https://github.com/h-enk/hyas" role="button">Deploy to Netlify</a>
<!--
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/h-enk/hyas "Deploy to Netlify")
-->
## Example site
2020-04-15 15:48:16 +02:00
2020-11-04 08:26:58 +01:00
👉 [hyas.netlify.app](https://hyas.netlify.app/)