Home Entrance Wiki Search Login Register

Welcome, Guest. Please login or register.
June 04, 2023, 04:10:27 pm - @632.26
Forum activity rating: Four Star Posts: 57/24hrs Unread Topics | Unread Replies | Own Posts | Own Topics | Recent Posts
News: :ozwomp: Reminder: Forum messages stay readable for years! Keep yours high quality! :ozwomp:

+  MelonLand Forum
|-+  World Wide Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ Help & Tutorials
| | | |-+  HELP: Implementing RSS into website?

« previous next »
Pages: [1] Print
Author Topic: HELP: Implementing RSS into website?  (Read 205 times)
Full Member ⚓︎


StatusCafe: daintyeco
iMood: daintyeco
Matrix: Chat!

View Profile WWW

Joined 2023!
« on: April 23, 2023, 10:55:03 pm »

Me again today! :drat:

To be honest, even after researching, I feel like a total noob about implementing RSS on my website, so I need to ask for help. I have two sites in there that update periodically, my Steam Deck modding journal and my Toybrick castle journal. I would love to offer people to subscribe via RSS so they know when a new entry is made on these instead of having to manually check.
I just honestly have zero idea how to do it or what to look out for especially in regards to edits - will all edits be regarded as new activity and sent out, or how can I signify a new post when they're all on the same page and just separated by dates?

I would love your input.

Sr. Member ⚓︎

’S fhearr Albais bhriste na Albais sa chiste

StatusCafe: cobradile
iMood: Cobradile
Matrix: Chat!
XMPP: Chat!
Itch.io: My Games

View Profile WWW

Pocket Icelogist!OG! Joined 2021!
« Reply #1 on: April 23, 2023, 11:11:53 pm »

I use easy feed editor to make the feeds, and then to insert them into the website I use this code:
<link rel="alternate" type="application/rss+xml" title="RSS feed" href="yourfeed.xml" />
This is the code to tell the browser "Hey, we have an RSS feed!" and the browser adds the icon to the URL, or whatever they do with the feeds.

I also extract from the RSS feed to populate my website's news section using Javascript:
let xmlContent = '';
        let news = document.getElementById('news');
        fetch('rss.xml').then((response)=> {
                xmlContent = xml;

                let parser = new DOMParser();
                let xmlDOM = parser.parseFromString(xmlContent, 'application/xml');
                let entries = xmlDOM.querySelectorAll('item');

                entries.forEach(entry => {
                    let entryblock = document.createElement('div');
                    entryblock.setAttribute("class", "newsItem");
                    let content = document.createElement('strong');
                    const date = new Date(Date.parse(entry.children[1].innerHTML));
                    content.innerText = date.getDate() + "/" + (date.getMonth() + 1) + "/" + date.getFullYear() + " ";
                    content = document.createElement('span');
                    content.innerHTML = entry.children[2].childNodes[0].nodeValue;

The children and where they are depend on what details you add to your feed (Like author, tags, preview image, etc.).

Hope this helps

“Snooping as usual, I see?”
Jr. Member ⚓︎

SpaceHey: Friend Me!
iMood: Unlocking6658

View Profile WWW

Joined 2023!
« Reply #2 on: April 23, 2023, 11:20:20 pm »

funny you should mention this! if you're on a Unix distro and like working from the command line, i'm working on a program to generate feeds; keep an eye here if you're interested in that!

aside from that, i update my blog's feed with a new post every time i add one to my site (though my RSS is currently broken). with regards to edits, i only add a new feed when i have new content to add. otherwise i just make subtle edits to the pages and leave a little note at the top saying "hey this is edited" :)

either way, good luck with getting an RSS feed setup! :D

i like to be addressed as they/them and i normally go by my forum username or "j" / "jay" :)

have a great day!!
Full Member ⚓︎


SpaceHey: Friend Me!
StatusCafe: tarraxahum
iMood: tarraxahum
Matrix: Chat!

View Profile WWW

Joined 2022!
« Reply #3 on: April 23, 2023, 11:22:04 pm »

I use easy feed editor to make the feeds,

holy heck where was this when I was figuring out RSS for my sites >:(

gotta save for future use

"Why change the past, when you can own this day?" (c)
Hero Member ⚓︎

So many stars!

SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games

View Profile WWW

spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!The Smallest Ozwomp Known To ManBug!
« Reply #4 on: April 23, 2023, 11:23:06 pm »

@m15o offers a web service that automatically generates feeds for you if you have your blog formatted in a certain way on your site - you just need to enter your page URL and it'll make the feed for you - https://forum.melonland.net/index.php?topic=379.0

I use it on my site (along with my own custom feed gen) and it seems to work pretty well!  :happy:

everything lost will be recovered, when you drift into the arms of the undiscovered
Full Member ⚓︎


StatusCafe: daintyeco
iMood: daintyeco
Matrix: Chat!

View Profile WWW

Joined 2023!
« Reply #5 on: April 24, 2023, 10:38:55 am »

Thank you all a lot, I will look into it! :unite: the solution by m15o might even work the best, since I already use their layout for these pages! I even saw the HTML Journal thing on statuscafé, but I never knew it was about RSS feeds.

Full Member

Scrap Vulture

View Profile WWW

€100 IRC InvestmentJoined 2022!
« Reply #6 on: April 24, 2023, 05:04:04 pm »

For editing RSS by hand (which is not too hard):

This line goes into the head part of every HTML page to detect your RSS feed:
<link rel="alternate" type="application/rss+xml" title="Feed" href="feed.xml">
The RSS file is a simple text file (in my example, it's called "feed.xml"). In your HTML code, link to the RSS file like you would link to an image on your page. As I have the RSS file and the HTML pages in one directory, I can link directly to it without needing to specify any further directories (see under "href", there is just the file name of the RSS file).

The feed.xml looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
    <title>Goose Attack Feed</title>
    <description>New geese attack information on this feed!</description>

   <title>New old scrap!</title>
   <description>Lots of new scrap available!</description>

When you have something new to present, you just copy one block between the <item>-tags and alter all the things. That's not the automated professional way, but if you're just using it, let's say, monthly, it's not that much work.
Pages: [1] Print 
« previous next »

Vaguely similar topics! (3)

Website size

Started by RolyBoard ✁ ∙ Web Crafting

Replies: 33
Views: 2422
Last post April 30, 2023, 05:50:10 pm
by PurpleHello98
Website example page

Started by IcelogistBoard ☆ ∙ Showcase & Links

Replies: 3
Views: 1131
Last post December 16, 2021, 06:50:33 am
by cinni
Website status (Check replies for part 2)

Started by IcelogistBoard ☆ ∙ Showcase & Links

Replies: 8
Views: 1455
Last post December 26, 2021, 08:11:46 pm
by Icelogist

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies Forum Guide | Rules | RSS | WAP2

MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery!