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 56 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
7c5b73f
Added october news update to What's New
finekatie Jan 9, 2025
097c684
changed file name
finekatie Jan 9, 2025
ade2a08
Create 2024-10-19-a11ydiscussionoctober.md
finekatie Jan 9, 2025
5b9f64a
Create 2024-10-15-sunsetUSWDS1.0.md
finekatie Jan 9, 2025
71216fa
Create 2024-11-04-a11ydiscussionnovember.md
finekatie Jan 9, 2025
0c7230c
Create 2024-11-15-uswds3.10.0releasepost.md
finekatie Jan 9, 2025
a766685
Create 2024-11-20-figmadesignkitbeta.md
finekatie Jan 9, 2025
6082ee1
Create 2024-12-12-novmcQA.md
finekatie Jan 9, 2025
ebba8a8
Update 2024-10-15-sunsetUSWDS1.0.md
finekatie Jan 9, 2025
50308c4
Update 2024-10-17-uswds3.9.0releasepost.md
finekatie Jan 9, 2025
d148146
Update 2024-10-19-a11ydiscussionoctober.md
finekatie Jan 9, 2025
b58bb55
Update 2024-11-04-a11ydiscussionnovember.md
finekatie Jan 9, 2025
14a708a
Update 2024-10-15-sunsetUSWDS1.0.md
finekatie Jan 9, 2025
81a0555
Update 2024-10-17-uswds3.9.0releasepost.md
finekatie Jan 9, 2025
33cffe4
Update 2024-10-19-a11ydiscussionoctober.md
finekatie Jan 9, 2025
c0e5075
Update 2024-11-04-a11ydiscussionnovember.md
finekatie Jan 9, 2025
d1332a7
Update 2024-11-15-uswds3.10.0releasepost.md
finekatie Jan 9, 2025
60c2cf5
Update 2024-11-20-figmadesignkitbeta.md
finekatie Jan 9, 2025
f94caf5
Update 2024-12-12-novmcQA.md
finekatie Jan 9, 2025
049a215
Add markdownify to excerpts
amyleadem Jan 10, 2025
5a34007
Merge branch 'main' of https://github.com/uswds/uswds-site into kf-Wh…
amyleadem Jan 13, 2025
fed3932
Updated markup in title to include colons
finekatie Jan 13, 2025
07c4993
Added dashes to filename
finekatie Jan 13, 2025
75dab01
Changed filename and added dashes
finekatie Jan 13, 2025
635672a
Updated filename and added dashes
finekatie Jan 13, 2025
6ef166c
Added dashes to filename
finekatie Jan 13, 2025
48a9b86
Removed 24 from filename - was already there
finekatie Jan 13, 2025
215c164
Added colon to title
finekatie Jan 13, 2025
8d24cda
Updated filename and added dashes
finekatie Jan 13, 2025
7dec7b4
Added dashes to filename
finekatie Jan 13, 2025
172def5
Added dashes to filename
finekatie Jan 13, 2025
5e647c3
Corrected code on tags to fix display
finekatie Jan 13, 2025
23e1b7f
Move post previews to _post-previews directory
amyleadem Jan 15, 2025
6a00825
Add test file to _posts
amyleadem Jan 15, 2025
02c4303
Update file name for sunset v1 docs
amyleadem Jan 15, 2025
c6aaa2d
Add conditional for "none" preview_url
amyleadem Jan 15, 2025
480580c
Update file name for 3.0 intro post
amyleadem Jan 15, 2025
9aa9e1e
Fix incomplete unless statement
amyleadem Jan 15, 2025
112e668
Format code
amyleadem Jan 15, 2025
0591bda
Remove test "whats-new" code from config
amyleadem Jan 15, 2025
c865ec9
Remove post_preview key; format code
amyleadem Jan 15, 2025
cd60d15
Simplify all_posts assignment
amyleadem Jan 15, 2025
60e4745
Update test post content
amyleadem Jan 15, 2025
90a5589
Remove permalink from post_previews collection
amyleadem Jan 15, 2025
3a25f58
Update preview_url -> url; update post -> preview
amyleadem Jan 15, 2025
097dd74
Update preview -> post; url -> preview_url
amyleadem Jan 15, 2025
709bd56
Update comment on post-preview.html
amyleadem Jan 15, 2025
4614055
Update post_previews->posts_short; remove category data
amyleadem Jan 21, 2025
086a50f
Format code
amyleadem Jan 21, 2025
21e848e
Add comment for false output for posts_short
amyleadem Jan 23, 2025
eb43973
Merge branch 'main' of https://github.com/uswds/uswds-site into al-wh…
amyleadem Jan 24, 2025
17939b9
Added better excerpt about release 3.10.0
finekatie Jan 27, 2025
f5745db
Added better excerpt for 3.9.0 release
finekatie Jan 27, 2025
a02b72e
Added better excerpt for 3.9.0 release
finekatie Jan 27, 2025
1c45773
Added better excerpt for 3.9.0 release
finekatie Jan 27, 2025
199c5a7
Remove test post
amyleadem Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ collections:
security_updates:
output: true
permalink: /:collection/:title
post_previews:
output: false
Copy link
Contributor Author

@amyleadem amyleadem Jan 15, 2025

Choose a reason for hiding this comment

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

Note

output:false prevents the post_previews collection from generating empty pages for this content type.

Copy link
Contributor

Choose a reason for hiding this comment

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

polish: It'd be nice to name this something more accurate. It could be easily misinterpreted and potentially confusing with post_previews. It's a short news update or blurb, not a post preview because there is no post.

Possible ideas

  • post_short
  • post_blurb
  • update
  • note
  • quick_post
  • post_quick

(Open to other ideas)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestions. Updated the collection and directory name from post_previews --> posts_short in 4614055. Aiming to keep the name similar to its sibling posts directory.


defaults:
- scope:
Expand Down
17 changes: 10 additions & 7 deletions _includes/post-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
- `/about/whats-new/all`
{% endcomment %}

{% assign post = include.post %}
{% assign post_id = post.title | default: post.id | slugify %}

{% comment %}
Assign header link url
- default: link to the post's generated page
- custom: link to a custom location declared in `post.preview_url`
- posts: link to the post's generated page
- post_previews: link to a custom location declared in `preview_url`
{% endcomment %}
{% assign post_url = site.baseurl | append: post.url %}
{% assign preview_url = post.preview_url | default: post_url %}
Expand All @@ -22,17 +21,21 @@
</p>

<{{ include.heading | default:"h2" }} class="post-preview__title">
<a href="{{ preview_url }}">
{{ post.title }}
</a>
{% unless preview_url == "none" %}
<a href="{{ preview_url }}">
{% endunless %}
Comment on lines +24 to +26
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note

This check allows us to remove the link from the preview header by adding preview_url : none to post_preview file's front matter.

{{ post.title }}
{% unless preview_url == "none" %}
</a>
{% endunless %}
</{{ include.heading | default:"h2" }}>

{% include post-meta.html %}
</header>

<div class="post-preview__content site-prose">
<p>
{{ post.lead | default: post.excerpt }}
{{ post.lead | default: post.excerpt | markdownify}}
amyleadem marked this conversation as resolved.
Show resolved Hide resolved
</p>
</div>
</article>
8 changes: 8 additions & 0 deletions _post_previews/2024-10-15-sunset-USWDS-1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Sunsetting the USWDS 1.0 documentation site
category: Product updates
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
---
8 changes: 8 additions & 0 deletions _post_previews/2024-10-17-uswds-3.9.0-is-out.md
amyleadem marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: USWDS 3.9.0 is out now
category: Releases
tags:
- Releases
excerpt: USWDS version 3.9.0 is out now!
preview_url: https://github.com/uswds/uswds/releases/tag/v3.9.0
---
8 changes: 8 additions & 0 deletions _post_previews/2024-10-19-a11y-discussion-october.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Accessibility focus: Going beyond visual design for inclusive user experiences"
category: Accessibility
tags:
- Accessibility
mejiaj marked this conversation as resolved.
Show resolved Hide resolved
excerpt: This National Disability Employment Awareness Month, we talked about how members of the design community go beyond visual design to create more inclusive user experiences. What steps are you taking to ensure that your website design is accessible to all?
preview_url: https://github.com/uswds/uswds/discussions/6109
---
8 changes: 8 additions & 0 deletions _post_previews/2024-11-04-a11y-discussion-november.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: 'Accessibility focus: An “autocompletely” useful WCAG technique!'
category: Accessibility
tags:
- Accessibility
excerpt: Does your site or product ask for personal info? If so, how are you putting [WCAG 1.3.5](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose) into practice?
preview_url: https://github.com/uswds/uswds/discussions/6177
---
8 changes: 8 additions & 0 deletions _post_previews/2024-11-15-uswds-3.10.0-release-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: USWDS 3.10.0 is out now
category: Releases
tags:
- Releases
excerpt: USWDS version 3.10.0 is out now.
preview_url: https://github.com/uswds/uswds/releases/tag/v3.10.0
---
8 changes: 8 additions & 0 deletions _post_previews/2024-11-20-figma-design-kit-beta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: USWDS Figma design kit beta is live
category: Product updates
tags:
- Product updates
excerpt: Our new official design kit beta contains 42 USWDS components built with USWDS design tokens, using variables and smart layouts. Updates, improvements, and changes will be coming over the next few months.
preview_url: https://www.figma.com/community/file/1440921849343185329/uswds-design-kit-beta
---
8 changes: 8 additions & 0 deletions _post_previews/2024-12-12-nov-mc-QA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: November monthly call Q&A
category: Monthly calls
tags:
- Monthly calls
excerpt: Attendees at the [November monthly call](https://digital.gov/event/2024/11/21/uswds-monthly-call-november-2024/) asked about the new Figma design kit, how the direction of USWDS would affect the current codebase, and more.
preview_url: https://github.com/uswds/uswds/discussions/6252
---
10 changes: 10 additions & 0 deletions _posts/2024-12-01-test.md
amyleadem marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Post Test
tags:
- updates
category: About
author: Dan O. Williams, James Mejia, Amy Leadem, Bonnie Cameron, Charlie Mahoney
excerpt: This post should appear between the Nov Q&A and figma design kit post previews.
---

Test post content
6 changes: 4 additions & 2 deletions pages/whats-new/all-news.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ type: posts
in_page_nav_headings: false
---

{% for post in site.posts %}
{% include post-preview.html post=post %}
{% assign all_posts = site.posts | concat: site.post_previews | sort: "date" | reverse %}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note

This combines the feed from /_posts with the feed from /_post_previews and sorts the entries by date. This allows us to have a mix of collection output types.


{% for post in all_posts %}
{% include post-preview.html %}
{% endfor %}
6 changes: 4 additions & 2 deletions pages/whats-new/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ cards:
in_page_nav_headings: "h2"
---

{% assign all_posts = site.posts | concat: site.post_previews | sort: "date" | reverse %}

{% include site-card-list.html
cards=page.cards
listClasses="margin-top-6"
Expand All @@ -46,8 +48,8 @@ in_page_nav_headings: "h2"
{:.margin-top-2.text-normal.font-lang-md.text-gray-70}
## News and updates

{% for post in site.posts limit:4 %}
{% include post-preview.html post=post heading="h3"%}
{% for post in all_posts limit: 4 %}
{% include post-preview.html heading="h3"%}
{% endfor %}

---
Expand Down
Loading