Announce List on start.fp.o?

I was just porting start.fedoraproject.org to the “3.0” Fedora Websites theme. You can see the development version here:

It uses REST API calls to fetch posts from fedoramagazine.org. I was thinking it might be neat to interleave posts from this site’s news feed.

So my questions are:

  1. Is that something that we would like to do?
  2. Is it feasible? (It might require making that .json endpoint world-readable.)
1 Like

I think it’s a good idea.

You should be able to just tack .json to the end of most URLs on this site to get corresponding a machine-readable endpoint. And that should be open without logging in.

There is also Embedding a list of Discourse Topics in another site - announcements - Discourse Meta — not sure if that’s better for your case.

2 Likes

Hey Matthew, I’ve made an attempt at fetching the announcements feed from this site for display on the new fedoraproject.org/start page. However, I’m seeing a “CORS” error in the developer console and the feed doesn’t show up. (Please ignore the theme problems; it’s a work in progress. :slightly_smiling_face:)

Is this something you can fix on the discussion.fedoraproject.org side? If not, there may be another possibility where we could restrict the news feed updates to only happen when the entire site is rebuilt on the Fedora infrastructure side.

1 Like

I made a config change — try now?

Unfortunately, it doesn’t appear to have worked. :confused: I think you should be able to see the effects immediately by refreshing https://fedoraproject.org/start. There’s no rush on this. :slightly_smiling_face:

Yep — looks like it now works!

@glb Are you pulling down the logo from the feed? We don’t have a graphic specifically for the announce list, but since that’s what these messages are, I think maybe it’d be better to have them labeled that way.

No. I just reused one that was already in the image library (fedora-discussion-plus-icon.png).

You are very welcome to hack on the theme if you want to. (Or you can create issues in the GitLab repository to request that someone else make the changes.)

The start page is defined in start.vue. Around line 65 is where that icon is being referenced. Changing it would just be a matter of uploading another image and changing that line.

As far as I’m concerned, just jump in and start submitting MRs. That’s what I did. :slightly_smiling_face:

BTW, if you are working on a new thumbnail image for the announcements feed on the start page, it would be helpful if you could make it the same dimensions as the thumbnails that are coming from Fedora Magazine (472x200). What I have now is trying to add an appropriately sized grey background, but it is buggy and doesn’t work right when the code fails to fetch data from discourse. If the source images are the same size, then I can remove the conditionals and I think that will fix the problem.

1 Like

For the record, I probably won’t, but I hope someone else does :slight_smile: