-
Notifications
You must be signed in to change notification settings - Fork 302
Changing the date of an event
Changing the date of an event is not trivial, both for us as a team, and for users who may have already signed up for the event. Here are two things you can do to prevent this from happening:
- make it clear with speakers that changing the date of an event is not easy
- get an agreement of the date early
- indicate that changing the date of an event harms the trust that the users put in us to offer high-quality events
That said, 💩 happens.
There are a few paths for changing the status of an event
- Change the date of the event
- Postpone the event, and update with a new date at a later time
-
Delete the event from the site😡 Never do this!
This assumes the event is currently live on https://digital.gov/events.
For this example — let's assume that the USWDS team could not hold their monthly April call on April 16, 2020
and they need to move it to May 7, 2020
. They still intend to hold their May call on May 21
. This example shows how to change an event date, and move it to a separate month.
So we will be changing
- from this url https://digital.gov/event/2020/04/16/uswds-monthly-call-april-2020/
- to this url https://digital.gov/event/2020/05/07/uswds-monthly-call-april-2020/
- and adding a redirect to form the old url to the new one
You can do this in a number of ways.
-
In the Code tab, scroll down to the list of files ad folders and navigate to
content
, then toevents
, then to the year2020
, then to the month04
, until you find the file for the event you want to change. -
Click to open the file for the event. Should looks like this
Let's first focus on editing the filename and putting it in the new location, organized by date.
- Click to "edit this file"
Now you should see this. Here's where you'll edit the filename and move the file.
And since we are moving this file to a new month, from content/events/2020/04/
to content/events/2020/05/
, we are going to do that first.
(Note: if you are not changing the date to a new month, you do not need to move the file to a new folder)
- In the filename field, put the cursor at the start of the filename
We'll start by moving the file up one folder to the content/events/2020/
folder
-
with the cursor at the start of the filename, type
../
. The file should be atcontent/events/2020/
folder. -
with the cursor still at the start of the filename, type
05/
. The file should be atcontent/events/2020/05
folder.
NOTE: this file is not yet saved! Please proceed to the next step.
Next, we will move on to editing the information in the front matter data for the event. This will change how the date/time appears on the event page.
-
Click into the main document body and find the fields
date:
andend_date:
. -
Edit the
date:
andend_date:
to reflect the new event date and time. The format for the date isyear
-mo
-day
hr
:min
:sec
-0500
-
date:
- old:
date: 2020-04-16 14:30:00 -0500
- new:
date: 2020-05-07 14:30:00 -0500
- old:
-
end_date:
- old:
end_date: 2020-04-16 15:30:00 -0500
- new:
end_date: 2020-05-07 15:30:00 -0500
- old:
NOTE: this file is not yet saved! Please proceed to the next step.
Since we're moving this page from one location to another, we need to let the site know which URLs should redirect to this page. More on adding redirects»
We are going to add in the redirect as the last field in the front matter, before the ---
.
- Copy this code
aliases:
- /2012/05/05/example-url
When redirecting multiple URLs, use multiple lines below aliases:
, like:
aliases:
- /2012/05/05/example-url
- /2012/05/06/another-example-url
NOTE: There should be two spaces before the dash!
-
Paste that code as the last field in the front matter, before the closing
---
, like this:
# Primary Image (for social media)
primary_image: "uswds-2-illio-feature-image"
# Redirects
aliases:
- /2012/05/05/example-url
# Make it better ♥
---
body copy goes here.....
- Next, get the URL of the page you want redirected to this page
In this example, it will be https://digital.gov/event/2020/04/16/uswds-monthly-call-april-2020/
-
Remove the
https://digital.gov
from the URL. It should look like/event/2020/04/16/uswds-monthly-call-april-2020/
-
replace the example URL in the code we pasted with this new path. It should now look like,
# Primary Image (for social media)
primary_image: "uswds-2-illio-feature-image"
# Redirects
aliases:
- /event/2020/04/16/uswds-monthly-call-april-2020/
# Make it better ♥
---
body copy goes here.....
It should look like this:
Next, we will commit the file using both the subject and body text
- Subject: "Changing event page date"
- Body: You need to indicate the URL you are changing it from as well as the URL you are changing it to. Be verbose! This text
Next, we will create a pull request that will create a preview and preset the changes to others on the team. The more you say in the pull request, the easier it will be for someone else on your team to figure out what they need to review and check. So do them a favor and explain the change in the body of the pull request. ❤️
The last thing you should do is to assign a reviewer. This person will be responsible for checking your work. Best of luck!
🚧 _This functionality is in the works. Coming soon. _ 🚧
Change a post/page to draft by adding draft: true
to the Frontmatter. Be sure to also redirect the page to something else so visitors don't get a 404 Page Not Found error.
🎉Questions? Email digitalgov@gsa.gov