ProjectPythia / projectpythia.github.io

https://projectpythia.org
Apache License 2.0
32 stars 19 forks source link

add blog infrastructure #347

Closed jukent closed 1 year ago

jukent commented 1 year ago

Adding blog infrastructure using Ablog as a place to make updates and announcements.

We might also want to embed the most recent update somewhere on the index homepage, but that is an extra layer of complexity.

Adding a navbar link to the Blog makes other Pythia pages more findable (About Project Pythia, Contributor’s Guide, and Code of Conduct), but also duplicates a link to the resource gallery. This highlights some other weeds in our portal code.

I think we should have a larger discussion about what we want this left navbar to look like, but that shouldn't block the inclusion of a blog.

Also, will have to add the blog to Foundations and Cookbook-Gallery navbars separately.

github-actions[bot] commented 1 year ago

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below. 🔍 Git commit SHA: 3759c286c53b8f1f2d0608eba7f82e62aae9a086 ✅ Deployment Preview URL: https://projectpythia.github.io/_preview/347

jukent commented 1 year ago

https://projectpythia.org/_preview/347/blog

Screen Shot 2023-08-08 at 1 16 21 PM
jukent commented 1 year ago

The left nav bar in question is determined by the toc at the end of the index.md page

---
hidden: True
maxdepth: 1
---
about.md
contributing.md
code_of_conduct.md
cookbook-gallery.md
resource-gallery.md

I think we should remove the resource-gallery from here, and maybe add a separate how-to-cite page (even though this is proposed in a PR to be on the main page, thoughts?). The about page is the only one only advertised in the footer. Contributing and code of conduct are in the "Join us" section.

Or is this not right because the cookbook-gallery is not in the navbar. -- Is that because cookbook-gallery.md is no longer a file but a separate repo and this toc is that out of date?

Update: removing resource-gallery here removes it from the blog page and the code of conduct page, but not about or contributing for some reason. This is on my local build.

brian-rose commented 1 year ago

Hi @jukent, a lot of ideas / questions here!

I think adding a blog is a great idea. I also use the ablog package for my personal site.

I think there are a lot of design decisions about our home page / site navigation that are out of date and should be reconsidered. My suggestion for now is to avoid trying to solve too many problems at once. Let's get the blog going (yay!) and then devote some upcoming meeting time to brainstorming an overhaul of the site navigation.

It would be great to have a prominent "latest posts" section easily visible from the home page for news and announcements, but let's deal with that separately.

jukent commented 1 year ago

Yay thanks @brian-rose I tried not to push any changes related to other site navigation issues, but adding the blog highlighted them in my mind. Happy to discuss this more on Monday.

clyne commented 1 year ago

@jukent is there any documentation (contributor's guide) on how to create a new blog post with ablog?

jukent commented 1 year ago

There should be! I'll add that. For now I believe, if you just make a .md file in the posts/ folder that has this header

---
blogpost: true
date: Aug 29, 2023
author: John Clyne
tags: cook-off
---

it will appear in the blog

clyne commented 1 year ago

Cool. Thanks!

clyne commented 1 year ago

Uh oh. That doesn't seem to be working for me. The new blog post does not appear when I test locally. I've done a complete environment install from scratch and have followed our contributor's guide. The new file, cookoff2024-savethedate.md simply contains:

---
blogpost: true
date: August 29, 2023
author: John Clyne
tags: cook-off
---

# Pythia Cookbook Cook-Off Hackathon 2024 - Save the Date!

The 2024 Pythia Cookbook Cook-Off Hackathon will take place June
10 - 14, at the NCAR Mesa Lab, located in Boulder, Colorado. Save
the date. More details to come!
brian-rose commented 1 year ago

@clyne try explicitly setting

date: Aug 29, 2023

and see if that helps.

I can't find it mentioned anywhere in the ablog docs but all the examples seem to use three letter months.

clyne commented 1 year ago

Thanks, @brian-rose, but no dice. The blog menu item links to https://projectpythia.org/blog. I'm guessing this is resolving to the production site, and there is no way to preview the results (until the PR, #352, is merged)???

jukent commented 1 year ago

@clyne one hiccup of our navbars is that if you click the "blog" option is directs you to the real published site and out of the preview. Are you clicking that button? If so, try adding /blog to the URL path manually instead.

clyne commented 1 year ago

Yes, that works. Thank you. Should we be using relative URLs where possible to avoid this problem, or would that open up another can of worms?

jukent commented 1 year ago

Yes I'll investigate that this week. I think it's kept this way to keep the navbar consistent across repositories. But I think it can be a relative link from the portal, if not from foundations.

clyne commented 1 year ago

Thanks, @jukent. Probably not a high priority - I don't think we get a lot of external contributions to the portal:-)

brian-rose commented 1 year ago

Yes we are duplicating / triplicating a bunch of code to create the same navbar from different repositories, with this unfortunately side-effect in the previews. There must be a better way to do it. Maybe that will follow from our Sphinx theme reboot efforts.