aboutsummaryrefslogtreecommitdiffstats
path: root/server.py
Commit message (Collapse)AuthorAgeFilesLines
* Caching support. Separate views.py in 2 filesmjfernez2021-10-101-3/+18
| | | | | | | | | | | This commit adds the Flask-Caching module to the software stack and enables the caching of views in a wide variety of ways, but implemented here to be simple to understand to someone new to the concept of caching (aka me). Various documentation and formatting was applied to all files. views.py internal functions (mostly related to filesystem operations of the server). have been moved into view_functions.py
* Adds gzip support by defaultmjfernez2021-10-061-1/+4
| | | | | | This commit adds Flask-Compress to the stack, an excellent module that makes the site load faster. This also adds and amends the default siteconfig
* Clarify siteconfigmjfernez2021-08-251-8/+6
| | | | | | | | | This clarifies what the MAIN_SITE_DIRS option means since one might read it to mean you can put your directories anywhere. Not so, you can only pick which dirs are displayed with that option. Also recommends to not use the secret key unless needed (for what reason, I don't know).
* hotfix: allowed hiddent top site dirsmjfernez2021-06-161-1/+2
|
* Changed / to /site, added views.py, README amendedmjfernez2021-06-161-172/+12
| | | | | | | | | | | | | | | | | | | | Previously this program served files in the 'templates/site' dir on '/', but this caused problems when accessing raw files using '/raw/' which is useful for embedding or quickly downloading content. It's also an inconvenience to the user, since they have to add a word rather than double-clicking an replacing it. The main server file and the base and index templates have been changed to reflect this. The codebase has been reorganized to separate views from the main flask app. Blueprints were avoided since only one blueprint would be needed so thus unnecessary. README and docstrings were also expanded for clarity and edited for errors. Some comments
* Force UTF-8 encodingmjfernez2021-06-091-2/+2
|
* PEP8 and README tweaksmjfernez2021-06-091-8/+8
| | | | | Fixes PEP8 formatting because apparently coala messed this up. Added some clarifying notes in the README.
* Added ability to override templates.mjfernez2021-06-081-1/+2
| | | | | | | | | This commit primarily adds the ability to override the base template by adding a '!' on HTML files. It also makes adjustments to the index page display to not show this extra character. Additions to the README reflecting this change, as well as small note on similarity to neocities was added
* wsgi compatibilitymjfernez2021-06-071-3/+3
| | | | | Moves the setup() function outside of main so the app is setup before a wrapper runs it. Also fixes deployment tutorial in the README
* first commitmjfernez2021-06-071-0/+198