-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add RSS feed #379
Add RSS feed #379
Conversation
export const SITE_TITLE = "MapLibre"; | ||
export const SITE_DESCRIPTION = | ||
"The MapLibre Organization is an umbrella for open-source mapping libraries."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this on src/pages/index.astro
and didn't want to repeat it elsewhere since it's also needed on the RSS feed. I moved the string here. Feel free to move somewhere else or do it differently.
@@ -7,4 +7,10 @@ export default defineConfig({ | |||
base: "", | |||
integrations: [mdx(), solidJs()], | |||
output: "static", | |||
site: "https://maplibre.org/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noting that this is also needed in a few places by the RSS feed, could look at another approach if you'd prefer.
src/components/Footer.astro
Outdated
height="16" | ||
><path | ||
fill="#fff" | ||
d="M2.002 2.725a.75.75 0 0 1 .797-.699C8.79 2.42 13.58 7.21 13.974 13.201a.75.75 0 0 1-1.497.098 10.502 10.502 0 0 0-9.776-9.776.747.747 0 0 1-.7-.798ZM2.84 7.05h-.002a7.002 7.002 0 0 1 6.113 6.111.75.75 0 0 1-1.49.178 5.503 5.503 0 0 0-4.8-4.8.75.75 0 0 1 .179-1.489ZM2 13a1 1 0 1 1 2 0 1 1 0 0 1-2 0Z" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the SVG duplicated? Can it be stored in a css file or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this icon was duplicated, just fixed. Other icons on the footer didn't have a file so I didn't want to break the consistency. I'll raise another PR moving them too to SVG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I raised #380 which does the same pattern for the other footer icons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've merged the other PR, thanks!
I'll leave this one to someone else...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, this is now synced with main too, thanks for your suggestion!
I've added a few minor comments, but I don't understand Astro enough to fully understand how this will work and this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It looks correct to me. Let's see if it works as expected.
@martgnz , I tried a bit with "Feedly" , I'm not sure if I'm picking up the old or the new RSS feed. Can you help figure out if it's working as you expect it to? Also, to make sure if content is cropped, like if the entire posts are included in the feed. |
@birkskyum I tried with Feedly and your screenshot does show the old feed, which seems to be cached somehow. If you add a new feed and enter the HTTP address We could move the RSS address (https://groups.google.com/g/feedly-cloud/c/3evZeYOnS2I, https://groups.google.com/g/feedly-cloud/c/ZsUe_D5H43Q). I followed the same old address because it seemed like a good idea and I don't like breaking URLs if it can be avoided. We could wait it out as well. On NetNewsWire the feed works correctly without problems. |
This app works great. I'll contact Feedly to see if we can clear this cache. |
Adds a RSS feed with the full content, which was dropped recently when the site got moved to Astro.
This PR will create a feed on
https://maplibre.org/news/index.xml
, which was the location of the old feed, I believe, to avoid breaking links. I had to make a dynamic route with only the feed otherwise it returned a 404 since the xml path was matching the.astro
dynamic route.This uses the new Astro Container API, with an approach similar to https://blog.damato.design/posts/astro-rss-mdx/.
I also added RSS icons on blog index and footer:
Testing
If you want to test you can use NetNewsWire and point a new feed to the localhost Astro URL. The images won't work locally due to the Astro asset pipeline but they should appear on the built website. If you run
npm run build
and inspectdist/rss.xml
you will see them referenced correctly.