Giter Site home page Giter Site logo

sample-feeds's Introduction

Sample Feeds

A website containing sample Atom, RDF, and RSS feeds - sample-feeds.rowanmanning.com.

Table of Contents

Adding new feeds

To add new feeds you'll need Node.js version 16+, and to clone this repo locally (it's best to first fork this repo and then clone your fork so you have push access). Run the following in this repo to install dependencies:

npm install

Step 1. Pull in a copy of the feed

To add a new example feed (an academic example, not a real-world feed), then run the following, where <FEED_URL> is the full HTTP or HTTPS URL to an Atom or RSS feed:

node ./scripts/new-example.js <FEED_URL>

To add a new real-world feed, then run the following, where <FEED_URL> is the full HTTP or HTTPS URL to an Atom or RSS feed:

node ./scripts/new-real.js <FEED_URL>

Step 2. Update feed data

You should find that a new pair of files have been created in either content/examples or content/real-world under a directory that's an MD5 hash of the feed URL. Perform the following manual steps to get the feed ready:

  1. Update index.md to have a descriptive title. Also optionally add some Markdown below the second --- to add a sentence describing the feed. See existing feeds for examples of this.

  2. Update index.md to have a correct feedType property. You should be able to determine the type of feed (RSS or Atom) based on the created feed.xml file.

  3. Update feed.xml to anonymise email addresses. RSS feeds often have email addresses as author data, these should be set to [email protected] or a similar fake email address.

  4. Update feed.xml to make sure that self links point to the new feed URL. Search for rel="self" within the file and replace the URL found there with https://sample-feeds.rowanmanning.com/real-world/<YOUR_FEED_MD5_HASH>/feed.xml. Sometimes this will be a <link> element, and sometimes it'll be an <atom:link> element.

Step 3. Commit

Commit your changes on a new branch, push to your fork of this repo, and open a pull request.

Running locally

  1. Install Hugo

  2. Clone this repo locally:

    git clone https://github.com/rowanmanning/sample-feeds.git && cd sample-feeds
  3. Run hugo server

  4. Visit http://localhost:1313/

Contributing

The contributing guide is available here. All contributors must follow this library's code of conduct.

License

Licensed under the GPLv3 license.
Copyright © 2022, Rowan Manning.

sample-feeds's People

Contributors

dependabot[bot] avatar rowanmanning avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.