Library
We've built out an initial library that you can use in your apps or you can fork and modify to fit your needs.
Logger​
- logruslogger - logging using
sirupsen/logrus - zaplogger - logging using
uber-go/zap
Storage System​
- awsbucketstorage - backend storage support for Amazon S3 buckets
- azureblobstorage - backend storage support for Azure Blob Storage
- gcpbucketstorage - backend storage support for Google Cloud Storage buckets
- localstorage - backend storage support using local filesystem
Session Manager​
- scssession - session management using
alexedwards/scs
Template Engine​
- htmlengine - HTML templating using
html/templateandembed.FSwithoxtoacart/bpoolfor template buffering
Router​
- awayrouter - routing using fork of
matryer/way - chirouter - routing using
go-chi/chiwithparamconvert - gorillamux - routing using
gorilla/mux - jshttprouter routing using
julienschmidt/httprouterwithparamconvert - patrouter - routing using
bmizerany/patwithparamconvert
Middleware​
- cors - supports Cross-Origin Resource Sharing (CORS) on
/api/*endpoints - etagcache - supports entity tag (ETag)
- gzipresponse - adds gzip content compression to every response
- healthcheck - returns a 200 HTTP status code on endpoint
/api/healthcheck - jwt - supports JSON web tokens
- logrequest - output
infolog with timestamp, remote address, HTTP method, and URL for every request - notrailingslash - strips trailing slashes from requests except on
/debugendpoints to supporthttp.pprof - proxyrequest - adds
reverse proxyto support forwarding API and UI requests to separate URLs, ports, or microservices - redirecttourl - adds URL redirection if request doesn't match site URL
- securedashboard - disallows unauthenticated access to
/dashboardendpoints - uptimerobotok - sends a 200 HTTP status code when a HEAD request is sent to
/to support UptimeRobot
Generic​
- author - adds a configurable author meta tag to all HTML templates
- bearblog - provides Bear Blog like functionality for simple, markdown based articles
- bearcss - adds CSS styling based on the Bear Blog
- bootstrap - adds the Bootstrap library to all pages
- charset - adds a configurable charset meta tag to all HTML templates
- debugpprof - enables
http.pproffor HTTP server runtime profiling on/debug/pprofendpoints - description - adds a configurable description meta tag to all HTML templates
- disqus - adds Disqus comment blocks to all Post layouts
- envinfo - adds a page at
/dashboard/envthat displays all server environment variables - foundation - adds the Foundation library to all pages
- googleanalytics - adds Google Analytics tracking code to every template
- htmx - adds the htmx JavaScript library to all pages
- jquery - adds the jQuery library to all pages
- pluginmanager - adds a plugin management system that is available on the
/dashboard/pluginsendpoint - prism - adds syntax highlighting using Prism to markdown code blocks
- robots - adds a simple
/robots.txtendpoint for web crawlers - rove - run MySQL migrations on a database
- rssfeed - adds a RSS feed to the
/rss.xmlendpoint and adds alinktag to every template - simplelogin - adds a login page with MFA support and dashboard page to customize site meta data
- sitemap - adds a Sitemap to the
/sitemap.xmlendpoint - stackedit - adds the in-browser markdown editor, StackEdit, to all textfields with the
id_contentID. Built for use with thebearblogplugin - styles - adds configurable Favicon and CSS styles to all templates
- tailwindcss - adds the tailwindcss library to all pages
- viewport - adds a mobile-optimized viewport meta tag to all HTML templates