www.jacksorrell.com

command module
v0.0.0-...-006488c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

README

www.jacksorrell.com

js-happiness-style

My personal website at https://www.jacksorrell.com

Configuration

Run ./www.jacksorrell.com genconfig to generate a sample configuration yaml file. Modify this config file as needed.

All config options can also be passed as flags. Run ./www.jacksorrell.com help for more information.

Options
# The commented out fields are reqired

# General
logLevel: warn # Valid Levels: panic, fatal, error, warn, warning, info, debug

# Server
server:
  port: 3000

# Contact Form
contact:
  mailgun:
    # publicValidationKey: pubkey-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    # privateAPIKey: key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  email:
    # domain: mg.example.com
    # toAddress: contact@example.com
    subject: Contact Form Message
  # Maximum input lengths
  maxLengths:
    name: 70
    email: 254
    message: 10000

Building from Source

Node.js and NPM required to generate assets.

Generate Assets

npx gulp && go generate

Compile

go build

All assets will be embedded in the executable (except for the configuration).

Development

Node.js and NPM required to generate assets.

Development Mode

To automatically recompile assets and reload the browser on changes using browsersync, run npx gulp dev

Compile using go install -tags 'dev'. This will not cache any assets. They will be reread from disk.

Systemd

Example Configuration
[Unit]
Description=www.jacksorrell.com server
After=network.target

[Service]
User=example_user
Group=example_group
WorkingDirectory=/var/www/www.jacksorrell.com
ExecStart= start
Restart=on-failure

[Install]
WantedBy=multi-user.target

Design Choices

  • Original favicon created using font The Wastes of Space.

  • Favicons automatically generated.

  • Use contact form to protect email from spambots.

  • Contact form sends email via Mailgun and is protected from bots by a honeypot input.

  • www.jacksorrell.com/resume permanently redirects to www.jacksorrell.com/resume/.

  • Embedding assets allows for portability.

Updated September 2018

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
routes
utils
io
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL