aboutsummaryrefslogtreecommitdiffstats
path: root/siteconfig.py
Commit message (Collapse)AuthorAgeFilesLines
* Restored siteconfig to previous commit 5589754533amjfernez2022-03-141-10/+7
| | | | | I accidentally merged the siteconfig from mjfer.net into the main branch. This restores the original file
* Pull changes from mjfer.netmjfernez2022-03-131-7/+10
| | | | | This commit adds the changes from the mjfer.net which enable using git as the file last update tracker
* Remove flask caching and unused importsmjfernez2022-02-251-29/+0
| | | | | | | | | | | | | This removes Flask caching since it seems I'm dumb and can't implement it correctly and it seems to serve pretty much no purpose anyway. Caching can always be handled by the server in front This commit also removes some unused imports that were leftover after moving functionality to different files (like view_functions) Flask compress might be useless too since nginx can also gzip. But I can actually observe the change... is there any problem with double gzipping?
* Separates user configuration siteconfig from coremjfernez2021-11-261-34/+7
| | | | Creates config.py to handle all filesystem stuff
* Fixes is_hidden_path, RSS. Adds txt support, RSSmjfernez2021-10-181-11/+27
| | | | | | | | | | | | | | | This commit fixes the is_hidden_path function to work for subdirectories and also remove entries from the RSS file view_functions.py has been refactored use the siteconfig file instead of the app to remove unecessary imports and avoid circularly imports This also moves logic for the default site directories from server.py to siteconfig.py so it's accessible before the app runs. This has the benefit of cleaning up the server file, but the drawback of adding the os import to the siteconfig file. Settings have been moved around for (hopefully) easier reading
* Turns off jinja caching. Fixes appropriate cachemjfernez2021-10-161-1/+1
|
* Adds RSS auto-generation for files in 'site'mjfernez2021-10-141-19/+45
| | | | | | | | | | | This commit adds rss_generator.py which contains the main logic for indexing the site directory and generating a feed on startup. It serves as a sort of ad-hoc database which is accessed when /feed.xml is requested. Also corrects various typos, README nonsense, and expands the config options for RSS. Instances of './templates/site' have been replaced with the general BASE_DIR variable in the siteconfig.
* Improve README. Expanded cache configmjfernez2021-10-101-4/+26
| | | | | | This commit removes a lot of unnecessary rambling from the README and also makes it easier to use more complex cache options if you want to
* Caching support. Separate views.py in 2 filesmjfernez2021-10-101-9/+23
| | | | | | | | | | | 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-6/+12
| | | | | | 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-7/+13
| | | | | | | | | 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).
* wsgi compatibilitymjfernez2021-06-071-2/+0
| | | | | 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/+21