Skip to content

Community syndicated blog for hpc.social! 🗒️

License

Notifications You must be signed in to change notification settings

sramkrishna/hpc-social-blog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hpc.social Community Syndicated Blog

assets/images/blog.png

This is the repository for the syndicated blog for the hpc.social community! Here you can add an rss/xml feed to share stories and experiences to be presented in the aggregated blogs feed. This repository is based on the US-RSE community blog, which was also imagined, designed, and implemented by author @vsoch.

How do I contribute my blog?

  1. Fork the repository, clone to your machine, and checkout a new branch.
  2. Add your entry to the _data/authors.yml file
  3. Generate your set of posts (instructions below)
  4. Open a pull request to the main repository!

How does it work?

1. Add Metadata

An center, group, or individual that has a blog, podcast, or similar feed can add their metadata to the authors.yml file. Here is an example of the required fields that we collect:

- name: "hpc.social"
  tag: "hpc-social"
  url: https://hpc.social/
  feed: https://hpc.social/feed.xml

The tag must be unique (and this is tested), and the feed should be a format parseable by feedparser (most are).

Wordpress

WordPress is a common blogging platform, and so we include notes here for how to find a feed for your wordpress blog. If you want to include all content, you can usually find a main feed at https://<yourblog>/feed/. However, it's recommended to create a tag or category feed, in which case you could find the feed at https://<yourblog>/category/<category>/feed/. See the linked page for more ways that you can generate custom feeds based on tags and categories. Once you've added your feed, it's recommended to test generate posts to ensure that it's parsed correctly. This is done during the continuous integration, but you can also do it locally (see below).

Blogger

Blogger is Google's blogging platform and also provides a main feed at https://<yourblog>.blogspot.com/feeds/posts/default. Like Wordpress, you can also create a feed for a specific label or tag which can be accessed via https://<yourblog>.blogspot.com/feeds/posts/default/-/<label>. The page linked above also describes options if you want to publish only the first part of each post to your feed.

A known limitation with Blogger is that images embedded in blog posts won't appear in the Community Syndicated Blog version. This happens because Blogger disallows directly linking blog images from external sources.

2. Generate Posts

The posts are generated automatically - we do this by way of a cron job (scheduled job). During the run, each feed is read, and any new posts are generated as markdown files, with the author tag corresponding to the folder name in _posts. If the post is already included, it is skipped over. This is a reasonable task to do, because typically feeds only provide the 10 (or a small number) of latest posts.

If you look at the .github/workflows you'll notice that this workflow runs by way of a nightly job, and you can reproduce it locally! Here is how:

First install python dependencies:

$ pip install -r .github/requirements.txt

And then generate posts:

$ python scripts/generate_posts.py _data/authors.yml --output _posts/ --test

It will show you any new folders and files generated without actually doing it. Here is how to do it "for realsies":

$ python scripts/generate_posts.py _data/authors.yml --output _posts/

Development

To develop the site, clone the repository and then build with jekyll:

$ bundle exec jekyll serve

You can also run the script to generate posts locally, if you choose.

cd scripts

python generate_posts.py
usage: generate_posts.py [-o OUTPUT] authors

Authors Parser

positional arguments:
  authors               the authors.yml file.

optional arguments:
  -o OUTPUT, --output OUTPUT
                        The output folder to write posts.

This is how the posts are generated in the continuous integration setup:

python generate_posts.py ../_data/authors.yml --output ../_posts/

🎨️ Thank You! 🎨️

This is a modified version of Ephesus. We maintain the original LICENSE and preserve it here.

About

Community syndicated blog for hpc.social! 🗒️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 39.9%
  • CSS 29.7%
  • Python 28.1%
  • JavaScript 1.5%
  • Ruby 0.8%