tux-web-tools/rss-feed-site-generator

Generate sites from RSS feeds

1.7.0 2021-03-28 19:26 UTC

This package is auto-updated.

Last update: 2024-04-27 22:07:06 UTC


README

Symfony 5 application to generate a website for a given RSS feed, works best with podcast feeds.

Installation

Composer (preferred method)

composer create-project tux-web-tools/rss-feed-site-generator my_project_name

This creates the project and the mandatory configuration file.

Git/Source

Clone the repo or download the source code. And install via composer in the root of the project directory:

Development

composer install

Production

composer install --no-dev --optimize-autoloader

Set production environment

composer dump-env prod

Clear cache if needed

php bin/console cache:clear

Configuration

The global configuration file needs to be copied and renamed, if you did not use composer to create the project.

cd config
cp rss.yaml rss.local.yaml

Available configuration items

See the rss.yaml file to view all available configurations options.

Required configuration

The only required parameters are _rss_feedurl containing the url of the RSS feed and type to determine the type of site to be generated: Podcast 1 is the default type. To render a more generic RSS feed, type should be set to 0.

Further configuration

To display a custom logo different from the one the RSS feed provides, an image file can be placed in /public/image, the file name including file extension needs to be added to logo. The header can be customized further by overwriting title, description, background and font color in rss.local.yaml. It is also possible to customize the favicon via favicon.

To display "legal information" in the footer, copyright, _imprinturl and _imprint_linkname need to be provided.

If the content originates from another website, a _canonicallink can be added.

Child theme

The usage of a custom child theme can be enabled by setting _childtheme to 1. Copy the original theme and rename it to _rss_feedchild.

cd templates
cp -r rss_feed rss_feed_child

The file extensions and inclusions need to be adjusted accordingly e.g.:

{% extends 'rss_feed_child/feed_site.html.twig' %}
{{ include('rss_feed_child/_metatags.html.twig' }}

The main templates required by the application:

  • Podcast feed:
    • podcast.html.twig
    • _episodes.html.twig
  • Generic item feed:
    • generic.html.twig
    • _items.html.twig
  • error.html.twig for both types

These templates must be present, their contents however can be adjusted and extended to customize the generated site's appearance.

To add custom.css and custom.js place those files inside the corresponding directory in public/css or public/js and copy and paste the stylesheets and javascripts twig blocks from base.html.twig in your child theme and add the custom files.

Routing

The routing is defined in /config/routes.yaml. The default path for the application is {domain}/public/.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments