On 04. 03. 19 3:49, Ryan Lerch wrote:
On Fri, Mar 1, 2019 at 9:13 PM Miro Hrončok <mhroncok@xxxxxxxxxx
<mailto:mhroncok@xxxxxxxxxx>> wrote:
On 28. 02. 19 20:14, Rick Elrod wrote:
> On the backend, I believe we could benefit from looking at modern
> static website generators and shifting from our custom solution to
> something newer and better supported. As stretch goals, we could also
> look at the infrastructure side of things and change up how
> deployments work. However, that might be out of scope for the first go
> at this spec.
We have been very happy with Flask [1] based backends with Frozen-Flask [2]. A
static side generator based on a dynamic web framewrok.
There is Elsa [3], our litter opinionated helper around those (probably not
usable in Fedora, as it assumes GitHub pages, but linked it anyway for
reference).
We use it in Fedora for fedoralovespython.org <http://fedoralovespython.org>
[4] and portingdb.xyz <http://portingdb.xyz> [5].
The Czech Python community uses it for python.cz <http://python.cz>,
pyvec.org <http://pyvec.org>, naucse.python.cz <http://naucse.python.cz>,
pyladies.cz <http://pyladies.cz> and others. The Slovak Python community
freezes Flask for pycon.sk <http://pycon.sk>
AFAIK.
The good thing about such Frozen-Flask approach is that you can change a
website
(or part of it) to dynamic or back as needed. If you choose a static only
framework, you are bound to static.
Flask is vivid yet stable, very popular Python web framework.
Thanks Miro!
Will have to have a look at frozen-flask. FWIW, i also have prototype of a
script for generating our static sites using Jinja2 as the templating language.
It currently supports translations and multiple sites with common shared templates:
https://pagure.io/fedora-websites-jinja-poc/
The good thing about (Frozen-)Flask is that all such things have already been
solved. I know Flask-Babel and Jinja2 is first class citizen in Flask.
I'm not saying it solved better or worse than in your prototype, however this
will be true even for futures you don't plan yet. Such features might need a
significant overhaul off the script, while for Flask many of the future problems
are already solved.
Yet by the end it is you who will work with this, not me, so be sure to evaluate
all your needs and not mine :)
If you need some help with Frozen-Flask, let me know.
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
websites mailing list -- websites@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to websites-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/websites@xxxxxxxxxxxxxxxxxxxxxxx