diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2022-06-19 23:57:04 -0400 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2022-06-19 23:57:04 -0400 |
| commit | bf7d9c79cae53f64fcd04527248987bd4e7ca3c4 (patch) | |
| tree | 0c763f6545cee4a287f5e6fa0a45489a85454325 /cmd/server/app.go | |
| parent | 235b8f871fdfa35f9595268d194d28a3de655ec0 (diff) | |
| download | go-website-bf7d9c79cae53f64fcd04527248987bd4e7ca3c4.tar.gz go-website-bf7d9c79cae53f64fcd04527248987bd4e7ca3c4.tar.xz | |
0.0.17a / Alpha. Introduce users and page editing.v0.0.17a
Breaking changes:
inc/base.html is now tpl/base.md by default. This can be overridden
on the command line.
404.md is now tpl/404.md. This can be overridden with templatedirectory
in the configuration file.
Additional files:
`auth.json` file that stores credentials and settings for
authorization cookie.
Further notes:
This will likely receive some major updates and changes over
the next few commits. The scaffolidng is now in place for
user accounts, login handling, and page editing.
It's all extremely basic at the moment, on the idea list:
Listing of all markdown files
File uploader and general content management
Flags to turn on/off git integration for edits.
Download / Upload of all markdown files as a backup/restore.
It's of course, all subject to change.
Diffstat (limited to 'cmd/server/app.go')
| -rw-r--r-- | cmd/server/app.go | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/cmd/server/app.go b/cmd/server/app.go index 4f62a09..d4977ab 100644 --- a/cmd/server/app.go +++ b/cmd/server/app.go @@ -16,11 +16,15 @@ type App struct { redisPool *redis.Pool RedisKey string - ReIndexPath string - StaticDirectory string - BaseTemplate string - DocumentSplit string - Suffix string + ReIndexPath string + StaticDirectory string + BaseTemplate string + TemplateDirectory string + DocumentSplit string + Suffix string + + // Related to user authentication + auth *Auth // Related to the Atom feed Title string @@ -59,6 +63,10 @@ func loadConf(fn string) (*App, error) { page.BaseTemplate = app.BaseTemplate } + if app.TemplateDirectory != "" { + page.TemplateDirectory = app.TemplateDirectory + } + if app.DocumentSplit != "" { page.DocumentSplit = app.DocumentSplit } |
