Browse Source

fix(onboarding): add explicit site port setting in install script

resolves an issue where awk couldn't find the right server to stop
Josh Habdas 2 years ago
Signed by: jhabdas GPG Key ID: B148B31154C75A74
2 changed files with 26 additions and 40 deletions
  1. +24
  2. +2

+ 24
- 38
archetypes/ View File

@ -2,7 +2,7 @@
title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = {{ .Date }}
description = "This text was generated using the After Dark post archetype."
draft = false # run 'hugo serve --buildDrafts' to generate draft content
draft = true
toc = false
categories = ["hacking"]
tags = ["after", "dark"]
@ -13,12 +13,12 @@ images = [
Before continuing please create a post archetype. Archetypes are located within markdown files in the `archetypes` directory of your site:
└── flying-toasters
├── archetypes
│   ├──
│   └──
├── content
├── archetypes
│   ├──
│   └──
├── content
If `` does not exist yet, copy it from the After Dark default:
@ -28,27 +28,28 @@ $ cd flying-toasters
$ cp themes/after-dark/archetypes/ archetypes/
Make some changes to `` then use `hugo` to generate a new post:
Make some changes to `` then use `hugo new` to draft a new post:
$ nano archetypes/
$ hugo new post/
$ hugo serve --buildDrafts --navigateToChanged
$ vi archetypes/ # or vim, emacs, nano ...
$ hugo new post/
You have now created a post using {{< external href="" text="Archetypes in Hugo" />}}. Archetypes establish defaults for new content like posts. Create new archetypes when creating [Custom Layouts](http://localhost:1414/feature/custom-layouts) to help maintain consistency within your content.
If `hugo server` is running with the `--navigateToChanged` flag your new post will appear automatically in JavaScript-enabled browsers. If you see an empty page you probably need to restart `hugo server` with the `--buildDrafts` flag.
Use archetypes to maintain consistency when creating content for [Custom Layouts](http://localhost:1414/feature/custom-layouts). Like custom layouts {{< external href="" text="Hugo Archetypes" />}} may contain templating logic.
{{< hackcss-alert type="info" >}}
<strong>Note:</strong> This {{< external rel="help" target="_self" href="http://localhost:1414/shortcode/alert/" text="Alert" />}} appears below the {{< external href="" text="Hugo Summary Split" />}}.
<strong>Tip:</strong> This message appears below a {{< external href="" text="Manual Summary Split" />}}.
{{< /hackcss-alert >}}
In addition to alerts After Dark includes a number of other [Shortcodes](http://localhost:1414/shortcode/) and other useful [Features](http://localhost:1414/feature/) such as its [Module System](http://localhost:1414/feature/module-system/).
The above tip uses a shortcode called [Alert](http://localhost:1414/shortcode/alert/). In addition to a number of [Shortcodes](http://localhost:1414/shortcode/) After Dark provides a number of other [Features](http://localhost:1414/feature/).
Module System gives After Dark sites the ability to add enhanced functionality using [Modules](http://localhost:1414/module/) like this one, which uses the [Fractal Forest](http://localhost:1414/module/fractal-forest/) module to decode and render a BPG image animation otherwise not possible in most browsers:
The [Module System](http://localhost:1414/feature/module-system/), for example, provides a module to display image animations with alpha transparency and something not possible using a GIF:
![BPG animation example](/bpg/cinemagraph-6.bpg)
@ -56,32 +57,17 @@ If you do not see the above animation, you may install the [Fractal Forest](http
Review the [Online Help](http://localhost:1414/) to learn about other useful features such as the [Section Menus](http://localhost:1414/feature/section-menu) navigational aid, responsive [Post Images](http://localhost:1414/feature/post-images/"), offline [Fuzzy Search](http://localhost:1414/feature/fuzzy-search/) and more.
If Online Help isn't running, start with the following:
$ cd flying-toasters
$ ./themes/after-dark/bin/help
Here're some cheat sheets for you to reference as you get started.
After Dark Scripts:
If online help isn't running, go ahead and start it using the corresponding command from the following cheat sheet within your site directory:
cd flying-toasters/themes/after-dark
./bin/upgrade # check for updates and upgrade
./bin/help # start online help docs
./bin/install # run the quick installer
cd ../../..
Hugo Commands:
# After Dark scripts
./themes/after-dark/bin/upgrade # check for updates and upgrade
./themes/after-dark/bin/help # start online help docs
./themes/after-dark/bin/install # run the quick installer
# Hugo commands
hugo # build site with default settings
hugo --minify # build with minified sources (hugo 0.45 and above)
hugo --minify # build with minified sources (hugo 0.47 and above)
hugo --config # build with custom config
hugo --templateMetrics # generate template metrics
hugo new # generate page content
@ -92,7 +78,7 @@ hugo serve --buildExpired # serve locally showing expired content
hugo serve --disableLiveReload # serve locally w/live reload disabled
hugo list drafts # list draft content
hugo list expired # list expired content
hugo list future # list future content
hugo list future # list future content
hugo [serve] --debug # build or serve hugo with debug info
hugo [command] --help

+ 2
- 2
bin/install View File

@ -96,12 +96,12 @@ update_archetypes () {
create_welcome_post () {
echo "Creating a helpful welcome post ..."
hugo new post/ 1>/dev/null
hugo new post/ 1>/dev/null
serve_site () {
echo "Starting site server ..."
hugo serve --buildDrafts --navigateToChanged 1>/dev/null &
hugo serve --buildDrafts --navigateToChanged --port 1313 1>/dev/null &
generate_help_docs () {