gouthambs / Flask-Blogging

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

Add script to use as standalone blogging engine #30

Open gouthambs opened 9 years ago

slippers commented 8 years ago

i can reflect on flask_bootstrap static resources a little here:)

flask_bootstrap provides StaticCDN. you would set the app.extensions['bootstrap']['cdns'] with StaticCDN instead of WebCDN

from the static_asset_loader in engine.py

mathjax = WebCDN('//cdn.mathjax.org/mathjax/latest/')
markdown = WebCDN('//cdnjs.cloudflare.com/ajax/'
                          'libs/markdown.js/0.5.0/')
bootstrap_markdown = WebCDN('//cdnjs.cloudflare.com/ajax/'
                                    'libs/bootstrap-markdown/2.8.0/')
gouthambs commented 8 years ago

Thanks @slippers . The idea here is to wrap all the core blogging features and create an interface for people to install this as a blog for their website.

krassowski commented 6 years ago

What about adding a python script to the package which would be initialized like: python -m flask_blogging init with optional path argument (by default the current working directory)?

This script would copy a pre-defined example/standalone dir (based on current examples but not crammed into a single file, extended to work with user-provided configuration and handle all the options from other examples, conditionally on the config settings) and gather configuration data (admin: login, password; database: name host, login, password) in a command-line interface.

gouthambs commented 6 years ago

@krassowski

This is a great suggestion. Happy to take a PR.