gouthambs / Flask-Blogging

A Markdown Based Python Blog Engine as a Flask Extension.
http://flask-blogging.readthedocs.org/en/latest/
MIT License
692 stars 164 forks source link

Add configuration variables for vendor libraries location #131

Closed roipoussiere closed 5 years ago

roipoussiere commented 5 years ago

Currently, all third-party libraries are provided via CDNs, defined directly in html code.

However there are some use-cases where a developer would want to specify a library location himself:

For all of these use-cases, it is easier to use configuration variables instead of monkey-patching flask-blogging.

That's why this pull-request put all third-party libraries locations in configuration variables. This includes:

For instance, a developer will be able to define in main.py:

app.config["VENDOR_BOOTSTRAP_CSS"] = '/static/css/bootstrap.min.css'
app.config["VENDOR_BOOTSTRAP_JS"] = '/static/js/bootstrap.min.js'

Not that by default, the CDNs are used, so it doesn't change the current behavior.

Other minor modifications:

gouthambs commented 5 years ago

@roipoussiere I expect users to override and create their own templates. I am afraid this PR is going to add a whole lot of config variables that most people won't use...

roipoussiere commented 5 years ago

Yes but all of these config variables are optional, so that changes nothing for these most people who won't use them.