Magnus Hagander ba9138f36b Add support for sending out news as HTML email
When a news article is approved, it gets delivered as an email to the
pgsql-announce mailinglist. It will render the markdown of the news
article into a HTML part of the email, and include the markdown raw as
the text part (for those unable or unwilling to read html mail).

For each organisation, a mail template can be specified. Initially only
two templates are supported, one "default" and one "pgproject" which is
for official project news. The intention is *not* to provide generic
templates, but we may want to extend this to certain related projects in
the future *maybe* (such as regional NPOs).

These templates are stored in templates/news/mail/*.html, and for each
template *all* images found in templates/news/mail/img.<template>/ will
be attached to the email. "Conditional image inclusion" currently not
supported.

To do CSS inlining on top of the markdown output, module pynliner is now
required (available in the python3-pynliner package on Debian).

A testing script is added as news_send_email.py in order to easier test
out templates. This is *not* intended for production sending, so it will
for example send unmoderated news. By sending, it adds it to the
outgoing mailqueue in the system, so unless the cronjob is set up to
send, nothing will happen until that is run manually.

Support is included for tagged delivery using pglister, by directly
mapping NewsTags to pglister tags.
2020-07-13 14:58:08 +02:00
2020-07-13 14:53:07 +02:00
2020-07-06 11:54:46 +01:00

The PostgreSQL website
======================

The code in this repository is what backs the website at www.postgresql.org.

The authoritative repository for this code is on git.postgresql.org, but it's
free to be mirrored anywhere.

Technology
----------
The website code is written in `Python <http://www.python.org>`_ using
the `Django <http://www.djangoproject.com/>`_ framework. Not surprisingly,
`PostgreSQL <http://www.postgresql.org>`_ is used as the database. Further details
about the code and technology can be found in the different documents in the
docs directory.

The website also uses the `Bootstrap <https://getbootstrap.com/>`_ CSS framework
as well as the `Font Awesome <https://fontawesome.com/>`_ icon library.

Content
-------
A fair amount of the content pages of the website are just static HTML templates.
If you wish to edit these, you only need to look at the templates/pages/
subdirectory. The content in here is simple HTML, and can be edited as such.

Contributing
------------
We appreciate all (most?) contributions to this project. If you wish to
contribute, be sure to sign up to the `pgsql-www <https://www.postgresql.org/list/>`_
mailinglist for any discussions, and post any suggested patches there. If you
want to make any major changes, be sure to have discussed those on the list first.

Licence
-------
The code for the website is licensed under
`The PostgreSQL Licence <http://www.opensource.org/licenses/postgresql>`_, which is
closely related to the BSD licence.

Django is released under its `BSD Licence <https://github.com/django/django/blob/master/LICENSE>`_.

Bootstrap is released under the `MIT Licence <https://github.com/twbs/bootstrap/blob/master/LICENSE>`_.
and includes the following software as well:

- jQuery & jQuery UI under the `MIT Licence <https://jquery.org/license/>`_
- Popper under the `MIT Licence <https://github.com/FezVrasta/popper.js/blob/master/LICENSE.md>`_

Font Awesome has a `combination of licences <https://fontawesome.com/license>`_:

The code of Font Awesome is released under the `MIT Licence <https://opensource.org/licenses/MIT>`_.
The icons of Font Awesome are released under the `CC BY 4.0 Licence <https://creativecommons.org/licenses/by/4.0/>`_.
The fonts of Font Awesome are released under the `SIL OFL 1.1 License <http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL>`_.

jQuery.matchHeight.js uses the `MIT Licence <https://github.com/liabru/jquery-match-height/blob/master/LICENSE>`_
normalize.css uses the `MIT License <https://github.com/necolas/normalize.css/blob/master/LICENSE.md>`_
Description
Mirror of the code behind www.postgresql.org
Readme 11 MiB
Languages
HTML 85.3%
Python 12.4%
CSS 1.3%
JavaScript 0.5%
PLpgSQL 0.2%
Other 0.1%