Commit graph

11 commits

Author SHA1 Message Date
Matt Baer
034db22f8c Break functionality out of Serve() func
- Adds a new interface, Apper, that enables loading and persisting
  instance-level data in new ways
- Converts some initialization funcs to methods
- Exports funcs and methods needed for intialization
- In general, moves a ton of stuff around

Overall, this should maintain all existing functionality, but with the
ability to now better manage a WF instance.

Ref T613
2019-06-13 18:50:23 -04:00
Matt Baer
238a913ce3 Make WriteFreely spacing consistent 2019-04-11 21:33:33 -04:00
Matt Baer
6c7ee76768 Support configuring resource directories
This adds new configuration values that specify the parent directory of
application resources:

- templates_parent_dir
- static_parent_dir
- pages_parent_dir
- keys_parent_dir

For any values not specified, the application will default to the
current directory.

This closes T560
2019-01-18 18:57:04 -05:00
Matt Baer
3ae45bc156 Fix spacing around copyright notices 2018-12-31 01:05:26 -05:00
Matt Baer
1274914207 Add copyright / license notices to .go files 2018-12-24 12:45:15 -05:00
Matt Baer
2b5e869916 Rename render.tmpl to post-render.tmpl 2018-11-23 12:37:59 -05:00
Matt Baer
03c36af2f9 Optimize template loading on non-post pages
Avoids loading render.tmpl where it isn't needed.
2018-11-23 12:37:59 -05:00
Marcel van der Boom
8144c9581d Use the samen render common template for user pages 2018-11-20 22:11:53 +01:00
Marcel van der Boom
a82882fddc Put the highlight logic into one common template
It now loads unconditionally and highlights all code blocks.

TODO: optimize to not load when there are no blocks
2018-11-20 21:51:39 +01:00
Matt Baer
3609e8065b Fix template loading on Windows
Now we join paths correctly on all OSes. This should close #2.
2018-11-09 14:40:47 -05:00
Matt Baer
a30fc5b52b Add handler, page, template loading 2018-11-07 23:50:50 -05:00