Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSS 2.0 + atom support #174

Open
wants to merge 6 commits into
base: v1/master
Choose a base branch
from
Open

RSS 2.0 + atom support #174

wants to merge 6 commits into from

Conversation

dch
Copy link

@dch dch commented Mar 11, 2021

I added this quickly but it does pass W3C RSS feed validation.

some things I need advice on:

  • what is the correct way to bind & use values from serum.exs ?
  • how to obtain correct path of whole site?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 92.401% when pulling 4503941 on skunkwerks:main into abf8025 on Dalgona:v1/master.

defp create_file(dest, pages, posts) do
%Serum.File{
dest: Path.join(dest, "rss.xml"),
out_data: rss_xml(pages, posts, &to_rfc822_format/1, bindings())
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don''t understand exactly what these 3 & 4th parameter are supposed to do

  • what input & return typespec this 3rd function is supposed to have
  • how to ensure variables are available in template

priv/build_resources/rss.xml.eex Outdated Show resolved Hide resolved
<atom:link href="<%= Path.join(Map.fetch!(bindings, :server_root), "/~dch/rss.xml") %>" rel="self" type="application/rss+xml" />
<%= for post <- posts do %><item>
<link><%= Path.join(Map.fetch!(bindings, :server_root), post.url) %></link>
<guid><%= Path.join(Map.fetch!(bindings, :server_root), post.url) %></guid>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG the bindings this is clearly wrong!

@dch dch mentioned this pull request Mar 11, 2021
@igalic
Copy link
Contributor

igalic commented Apr 15, 2022

@Dalgona any chance this could make it into v1?
(after whatever needs fixing?)

on many systems, gen_tcp will not open if port is already in use.
Ignore the error, and rely on the subsequent clause to validate the
test failure.
@dch dch marked this pull request as ready for review May 2, 2024 23:15
@dch
Copy link
Author

dch commented May 2, 2024

@Dalgona this PR brings rss + elixir 1.16/otp26 compatibility. Would be nice to have it reviewed and merged, and published to hex when you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants