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

More control over RSS (access to local variables?) #280

Open
kescobo opened this issue Jan 30, 2025 · 0 comments
Open

More control over RSS (access to local variables?) #280

kescobo opened this issue Jan 30, 2025 · 0 comments

Comments

@kescobo
Copy link

kescobo commented Jan 30, 2025

I know you didn't really make it to stabilizing RSS functionality, but it would be really great to be able to have a little more control. I'm trying to modify some stuff to make a podcast feed - I'm getting pretty close, but struggling a bit with modifying stuff in the item section without doing things manually.

Variables themselves seem to work, but not hfun_s with local context. So for example, here I can assign a local variable episode_length, and get it inserted, but what I'd really like to do is have it use the rss_enclosure file, and calculate the size directly.

Another example here, you define how a pubDate section of RSS is formatted - I wanted to change the time to be 8am in the ETC time zone, eg something like

function hfun_rss_pubdate(lc::Xranklin.LocalContext; tohtml=true)
    dt = DateTime(getvar(lc, :rss_pubdate, Date(1)), Time(8,0,0))
    return Dates.format(dt, "e, d u yyyy HH:MM:SS -0500")
end

But I can't seem to access the LocalContext struct. If instead I try getlvar, the variable doesn't seem to exist (everything comes in with Date(1)

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

No branches or pull requests

1 participant