Skip to content

bahadir/gezegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Planet

Planet is an RSS feed aggregator. It uses the gofeed library to parse RSS feeds and generates static HTML files.

Configuration

Here is an example configuration file:

# Feeds
[[blogs]]
author = "Bahadır Kandemir"
feed =  "https://bahadir.kandemir.fi/tag/test/rss"

# Application configuration
[application]
updateInterval = 60

# Timeline configuration
[timeline]
title = "Planet"
maxPosts = 50

# Allowed HTML tags in the summary
[[htmltag]]
tag = "p"
class = "mb-4 mt-0 text-base leading-relaxed"

Development

Run the following command to start the development server:

docker compose up --build

Then, open your browser and go to http://localhost:8080.

Configuration and the RSS feeds are periodically checked and updated every minute.

Templates

The application uses Go's html/template package to render the HTML files. The templates are located in the templates directory.

The following variables are available in the templates:

  • Title: The title of the page.
  • Blogs: A list of blogs.
    • Name: The name of the blog.
    • FeedURL: The URL of the RSS feed.
    • Link: The URL of the blog.
    • Image: The URL of the blog's logo.
    • Posts: A list of posts.
      • Title: The title of the post.
      • Link: The URL of the post.
      • Content: The content of the post.
      • ContentMore: true if the post has more content than the summary, false otherwise.
      • AuthorName: The name of the author.
      • AuthorImage: The URL of the author's avatar.
      • Image: The URL of the post's image.
      • Date: The publication date of the post.
      • Blog: Reference to the parent blog object.
  • Posts: A list of posts.
    • Title: The title of the post.
    • Link: The URL of the post.
    • Content: The content of the post.
    • ContentMore: true if the post has more content than the summary, false otherwise.
    • AuthorName: The name of the author.
    • AuthorImage: The URL of the author's avatar.
    • Image: The URL of the post's image.
    • Date: The publication date of the post.
    • Blog: Reference to the parent blog object.
  • Authors: A list of authors.
    • Name: The name of the author.
    • Image: The URL of the author's avatar.
    • Link: The URL of the author's website.
    • Recent: true if the author has recent posts, false otherwise.

Planet generates templates for the timeline, authors list and author archive.

About

Planet-like RSS feed aggregator

Topics

Resources

Stars

Watchers

Forks

Contributors