Browse Source

fix(bin): remove preview script

closes #38
Josh Habdas 1 year ago
parent
commit
4f7af96cff
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
2 changed files with 6 additions and 26 deletions
  1. 6
    10
      README.md
  2. 0
    16
      bin/preview

+ 6
- 10
README.md View File

@@ -12,7 +12,7 @@
12 12
 
13 13
 ## About
14 14
 
15
-After Dark is a minimalist dark theme and website starter kit for the [Hugo] static site generator. The theme makes use of modern web development and design trends while preserving the aesthetic and simplicity of hobbiest websites created during the mid- to late-1990’s. It includes an offline search app, cross-platform quick installer as well as a set of optional plug-in modules to enhance your website as it grows. Use it online or off to create anything from a microblog to a full-text content search engine.
15
+After Dark is a minimalist dark theme and website starter kit for the [Hugo] static site generator. The theme makes use of modern web development and design trends while preserving the aesthetic and simplicity of hobbiest websites created during the mid- to late-1990’s. It includes an offline search app, cross-platform quick installer as well as a set of optional plug-in modules to enhance your website as it grows. Use it online or off to create anything from a microblog to a full-text document search engine.
16 16
 
17 17
 ## Demo & Tutorial
18 18
 
@@ -51,7 +51,7 @@ Feature | Summary
51 51
 
52 52
 ## Getting Started
53 53
 
54
-After Dark requires a single dependency to operate. Before running the installation script please [install Hugo](https://gohugo.io/getting-started/installing) and, optionally, the [elinks] terminal browser, on your system. Instructions for installing both using [Homebrew](https://brew.sh/) on macOS:
54
+After Dark requires a single dependency to operate. Before installing please [install Hugo](https://gohugo.io/getting-started/installing), and optionally, the [elinks] text browser, on your system. Instructions for installing both using [Homebrew](https://brew.sh/) on macOS:
55 55
 
56 56
 ```shell
57 57
 brew install hugo elinks
@@ -63,17 +63,13 @@ Then run the quick installer located in `bin/install`, or just paste this into a
63 63
 wget -qO - https://git.habd.as/comfusion/after-dark/raw/branch/master/bin/install | sh
64 64
 ```
65 65
 
66
-The quick installer will download the theme and any [preinstalled modules](#module-system) and should complete in a matter of seconds. If you have `elinks` installed your new site [will open automatically](https://git.habd.as/comfusion/after-dark/src/branch/master/images/docs/feat-quick-installer.gif) with a local preview and next steps.
66
+Installation should complete in a matter of seconds. If you have `elinks` installed your new site [will open automatically](https://git.habd.as/comfusion/after-dark/src/branch/master/images/docs/feat-quick-installer.gif) with a local preview and next steps.
67 67
 
68
----
68
+To preview your site online using [Serveo](https://serveo.net) install an ssh server such as [dropbear](https://matt.ucc.asn.au/dropbear/dropbear.html) or [openssh](https://www.openssh.com), start [`hugo server`](https://gohugo.io/commands/hugo_server/) then run the following:
69 69
 
70
-To preview your site online at any time run the included `bin/preview` script from your After Dark installation directory:
71
-
72
-```sh
73
-cd flying-toasters && ./themes/after-dark/bin/preview
74 70
 ```
75
-
76
-Preview starts a [`hugo server`](https://gohugo.io/commands/hugo_server/) and connects it to [Serveo](https://serveo.net) to expose your website to the Internet using end-to-end encryption. You must have an ssh server such as [dropbear](https://matt.ucc.asn.au/dropbear/dropbear.html) or [openssh](https://www.openssh.com) installed on your system for the preview script to function.
71
+ssh -R 80:localhost:1313 serveo.net
72
+```
77 73
 
78 74
 ## Customizing
79 75
 

+ 0
- 16
bin/preview View File

@@ -1,16 +0,0 @@
1
-#!/bin/sh
2
-set -e
3
-
4
-HUGO_BIND_ADDR=0.0.0.0
5
-HUGO_PORT=1337
6
-if [ "$1" != "" ] ; then
7
-  HUGO_PORT="$1"
8
-fi
9
-
10
-if [ "$(lsof -nt -i4TCP:$HUGO_PORT)" != "" ] ; then
11
-   echo "Error: Hugo is already running on port $HUGO_PORT" >&2; exit 1
12
-else
13
-   trap 'kill -- -$$' 0 # Send SIGTERM to child/sub processes on EXIT
14
-   hugo server --quiet --disableLiveReload --port "$HUGO_PORT" --bind "$HUGO_BIND_ADDR" &
15
-   ssh -R 80:localhost:"$HUGO_PORT" serveo.net
16
-fi

Loading…
Cancel
Save