Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USWDS-Site - What's new: Create posts_short directory and add new items #3064

Open
wants to merge 64 commits into
base: al-whats-new-updates-feature-branch
Choose a base branch
from

Conversation

amyleadem
Copy link
Contributor

@amyleadem amyleadem commented Jan 15, 2025

Summary

  • Created an alternative directory for "short posts", which are entries to the news feed that do not have a related posts page. These short posts include a header, a short summary, and a link to another (non-posts) location.
    • To do this, I added a _/posts_short directory to the site and moved all "what's new" content that did not have an attached post to this directory.
    • The items inside _posts_short will be integrated with the items inside _posts in the "What's new" feed.
  • Added multiple post files to the What's new page for October and November.

Related PRs

This PR is the first step in the effort to re-organize and update the content and layout of the what's new page. I broke the prototype work into three different PRs so that we can lower the review burden. Here is my proposed merge order for the PRs:

  1. USWDS-Site - What's new: Create posts_short directory and add new items #3064 (This PR)
    1. Adds short post content type and creates new items in the news feed
  2. USWDS-Site: Enhance what's new page layout #3115
    1. Updates the layout of the what's new and all news pages
  3. Add a consolidated What's New changelog view #3091
    1. Adds consolidated changelog and updates existing changelog data

Related issue

Closes #2989

The README instructions for creating posts and post-previews will be added in #3047.

Preview link

Problem statement

Outdated content on what's new page

What's new page is out of date after recent page merge and reworking how content can be added. Need new news items added.

Post previews added to _posts generated empty pages

Adding preview-only items to the /_posts directory caused the site to build empty posts, which is unnecessary and bad for SEO.

Solution

Outdated content on what's new page

Blurbs were written up for events from October and November, reviewed and approved with feds and posts were created.

Post previews added to _posts generated empty pages

We created a separate collection for /_posts_short and set the output for this collection to false. This means that no pages will be generated for these files.

Anatomy of a short post

image

Example data structure for short posts with a link

---
title: USWDS 3.9.0 is out now
tags:
 - Releases
excerpt: USWDS version 3.9.0 is out now!
preview_url: https://github.com/uswds/uswds/releases/tag/v3.9.0
---

Example data structure for short posts without a link

---
title: Sunsetting the USWDS 1.0 documentation site
tags:
 - Product updates
excerpt: It's been over five years since we launched USWDS 2.0 and moved on from USWDS v1. We archived the USWDS v1 documentation site a few years back, and at the end of 2024 we'll be taking it offline. Content will likely still be available via archive.org.
preview_url: none
---

Testing and review

Content

  • Confirm the content is correct and relevant and links work.
  • Confirm the "Sunsetting the USWDS 1.0 documentation site" renders as expected (with no link in the header)
  • Confirm posts are appearing in the expected order

Devs

  • Confirm the what's new feed incorporates items from both /_posts and /_post-previews in the expected sort order
    • Because of its assigned date of 12/01/2024, the "Post test" item should appear in the feed in between "November monthly call Q&A" and "USWDS Figma design kit beta is live". Screenshot of expected order:
      image
  • Confirm pages are NOT generated for items in /_post-previews
  • Confirm pages are generated for items in /_posts
    • For example, Post test should exist and have expected content
  • Confirm no link is added to the "Sunsetting the USWDS 1.0 documentation site" preview on the All news and updates page
  • Confirm the directory structure and "post_previews" name is intuitive and makes sense
  • Confirm the code meets standards

finekatie and others added 30 commits January 9, 2025 18:18
Added October Accessibility discussion update.
Added update about sunsetting 1.0
Adding November accessibility discussion blurb
Added november 3.10.0 release blurb
Added blurb about Figma design kit beta
Added November monthly call blurb
added tag so it will appear
Added tag so it'll display on the page
Added tag so it'll display on the page
Added tag so it'll display on the page
corrected my markup on tags
corrected my markup on tags
Added tag so it'll display on the page
Added tag so it'll display on the page
Added tag so it'll display on the page
@amyleadem
Copy link
Contributor Author

Note

There is a new html-proofer build error. I will work on building a fix in a separate PR.

mejiaj
mejiaj previously approved these changes Jan 28, 2025
Copy link
Contributor

@mejiaj mejiaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified changes and resolved comments. Thanks @amyleadem.

Copy link
Contributor

@finekatie finekatie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good! Great work, Amy and team!

@amyleadem amyleadem changed the base branch from main to al-whats-new-updates-feature-branch February 18, 2025 18:41
@amyleadem
Copy link
Contributor Author

amyleadem commented Feb 18, 2025

Note: I updated the base branch on this PR to go into a feature branch instead of main. This feature branch will allow us to review each section independently while still merging all the what's new updates together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What's New: Add new recent content items to updated page
6 participants