Skip to content

Commit

Permalink
Merge pull request #7 from golift/dn2_cleanup
Browse files Browse the repository at this point in the history
Cleanup and Upgrade
  • Loading branch information
davidnewhall authored Jul 22, 2019
2 parents 1e1b146 + a74ba82 commit 52a2705
Show file tree
Hide file tree
Showing 12 changed files with 1,348 additions and 240 deletions.
34 changes: 0 additions & 34 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 21 additions & 14 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# [[ Production Configuration File for golift.io Code Repo ]]

# This is the host path used for godoc links, etc.
# Determined automatically if not set here.
host: golift.io

# Used as the title of the index page.
title: Go Lift Code

# Displayed as links on the index page.
title: Go Lift
logo_url: https://docs.golift.io/apple-touch-icon.png
description: Go Language Code Libraries - amazing!
links:
- title: Docker
url: https://hub.docker.com/u/golift
Expand All @@ -16,12 +12,15 @@ links:

# If this is set, a source link to this path is displayed on the index page.
# protip: setup a redirect for /source - see below.
src: /turbovanityurls
src: /source

# This controls the max-age cache-control value.
# This setting is global, can be set per path too.
cache_max_age: 86400

# This is the path used for badgedata. Most people will unset this to turn off badgedata.
bd_path: "/bd/"

# These paths will be redirected if redir is not ""
# This setting is global, can be set per path too.
# Redirection works like this: if the path matches,
Expand All @@ -35,10 +34,21 @@ paths:
/badgedata:
repo: https://github.com/golift/badgedata
redir: https://github.com/golift/badgedata

/unifi:
repo: https://github.com/golift/unifi
redir: https://github.com/golift/unifi
image_url: https://docs.golift.io/svg/ubiquiti_color.svg
description: Package unifi provides API methods to extract client and device data from a UniFi Controller.
Methods are also provided to marshal the data into InfluxDB data points that can be used to create visualizations.
This library is used by UniFi Poller to collect and graph network data.
links:
- url: https://golift.io/unifi-poller
title: "UniFi Poller"
- url: http://grafana.com/dashboards?search=unifi-poller
title: "Grafana Dashboards"
cache_max_age: 2345

/deluge:
repo: https://github.com/golift/deluge
redir: https://github.com/golift/deluge
Expand All @@ -51,18 +61,12 @@ paths:
/ffmpeg:
repo: https://github.com/golift/ffmpeg
redir: https://github.com/golift/ffmpeg
/application-builder:
repo: https://github.com/golift/application-builder
redir: https://github.com/golift/application-builder
/starr:
repo: https://github.com/golift/starr
redir: https://github.com/golift/starr
/securityspy:
repo: https://github.com/golift/securityspy
redir: https://github.com/golift/securityspy
/turbovanityurls:
repo: https://github.com/golift/turbovanityurls
redir: https://github.com/golift/turbovanityurls

# Unused Examples.
/david/:
Expand All @@ -79,3 +83,6 @@ paths:
redir: https://github.com/davidnewhall/secspy
/unpacker-poller:
redir: https://github.com/davidnewhall/unpacker-poller
/source:
redir_paths: [""]
redir: https://github.com/golift/turbovanityurls
38 changes: 36 additions & 2 deletions examples/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ CONFIGURATION
title
Used as the page and html title on the Index page.

host
Used as the import path host. Recommend setting this.
host required
Used as the import path host. This must be set.

description
Displayed as a description paragraph on the index page.

logo_url
If this is set, the logo is displayed in the index and package templates.
Set this to a URI or URL for an image that is used in an img src tag.

cache_age default: 86400
Cache-Control header max-age value. This is how long to tell upstream proxy
Expand All @@ -46,17 +53,44 @@ CONFIGURATION
links list
Links are displayed in a list on the index page. Each link has a title and a url.

bd_path
This parameter is used to control badgedata. Badgedata is a custom library
that provides "data" for badges. This is a feature used by golift.io, and
most people will probably disable this. Set it to "" or remove the line from
your config to disable badge data.

redir_paths list
These values are used in a string match to check it a path can be redirected.
This only works if a path has `redir` set to a non-empty value. If the request
URI contains one of these values it will be redirected. This setting is global
but it can also be set per path.

redir_index
If set, this parameter is used to redirect index page requests. By default
the index page is displayed from a built-in template. If you would rather
visitors get forwarded to another page put that URI or URL here.

redir_404
If set, this parameter is used to redirect 404 requests. Set this to a URI
or URL to redirect requests to that resulted in a missing page.

paths list
Paths are what make this application work. Add at least one. Each path should
have either repo or redir set. Or both. Each path has the following optional
attributes:

links
Each package can have a list of resource links. Each link has a url and
a title attribute.

description
If a description is provided, it is displayed on the package page.
HTML is OK.

image_url
If parameter is provided, it will be displayed at the top of the
package's page. This must be a URI or URL to an image (png, jpg, etc).

cache_age
See explanation above.

Expand Down
62 changes: 30 additions & 32 deletions examples/config.yaml.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# TODO: provide more examples of what you can do in this config file.

# This is the host path used for godoc links, etc.
# Determined automatically if not set here.
# This is required and must be set.
host: code.golift.io

# Used as the title of the index page.
# Used as the title in the index page template.
title: Go Lift Code

# Displayed as links on the index page.
# This test is displayed from the index page template.
description: Go Language Code Libraries - amazing!

# Set this to a URL for a logo image to be displayed on the index and package templates.
# logo_url: https://some.image.png

# Displayed as links in the index page template.
links:
- title: Docker
url: https://hub.docker.com/u/golift
Expand All @@ -22,6 +28,9 @@ src: /source
# This setting is global, can be set per path too.
cache_max_age: 86400

# This is the path used for badgedata. Most people will unset this to turn off badgedata.
#bd_path: "/bd/"

# These paths will be redirected if redir is not ""
# This setting is global, can be set per path too.
# Redirection works like this: if the path matches,
Expand All @@ -30,41 +39,30 @@ cache_max_age: 86400
# $redir + $subpath (subpath doesn't contain matched $path)
redir_paths: ["tar.gz", "wiki", "releases"]

# If you would like to redirect index requests instead of display a template,
# set this parameter to the URL that visitors should be forwarded to.
#redir_index: https://github.com/golift

# If you would like to redirect 404 requests instead of display "not found"
# set this parameter to the URL that visitors should be forwarded to.
#redir_404: https://golift.io

# Paths that get handled by this app.
paths:
/badgedata:
repo: https://github.com/golift/badgedata
redir: https://github.com/golift/badgedata
/unifi:
repo: https://github.com/golift/unifi
redir: https://github.com/golift/unifi
image_url: https://docs.golift.io/svg/ubiquiti_color.svg
description: Package unifi provides API methods to extract client and device data from a UniFi Controller.
Methods are also provided to marshal the data into InfluxDB data points that can be used to create visualizations.
This library is used by UniFi Poller to collect and graph network data.
links:
- url: https://golift.io/unifi-poller
title: "UniFi Poller"
- url: http://grafana.com/dashboards?search=unifi-poller
title: "Grafana Dashboards"
cache_max_age: 2345
/deluge:
repo: https://github.com/golift/deluge
redir: https://github.com/golift/deluge
/imessage:
repo: https://github.com/golift/imessage
redir: https://github.com/golift/imessage
/subscribe:
repo: https://github.com/golift/subscribe
redir: https://github.com/golift/subscribe
/ffmpeg:
repo: https://github.com/golift/ffmpeg
redir: https://github.com/golift/ffmpeg
/application-builder:
repo: https://github.com/golift/application-builder
redir: https://github.com/golift/application-builder
/starr:
repo: https://github.com/golift/starr
redir: https://github.com/golift/starr
/securityspy:
repo: https://github.com/golift/securityspy
redir: https://github.com/golift/securityspy
/turbovanityurls:
repo: https://github.com/golift/turbovanityurls
redir: https://github.com/golift/turbovanityurls

# Unused Examples.
/david/:
repo: https://github.com/davidnewhall/
wildcard: true
Expand All @@ -81,4 +79,4 @@ paths:
redir: https://github.com/davidnewhall/unpacker-poller
/source:
redir_paths: [""]
redir: https://github.com/golift/code.golift.io
redir: https://github.com/golift/turbovanityurls
Loading

0 comments on commit 52a2705

Please sign in to comment.