-
Notifications
You must be signed in to change notification settings - Fork 256
Add event/workshop script #15904
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
base: master
Are you sure you want to change the base?
Add event/workshop script #15904
Conversation
Your site preview for commit 80cd319 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-15904-80cd3196.s3-website.us-west-2.amazonaws.com. |
name: "${title}" | ||
start_date: ${sortableDate} | ||
end_date: ${endDate} | ||
url: "https://www.pulumi.com/resources/${slug}/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will need to be extended to be able to be pulumi or external
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, ty!!
timezone === 'EST' ? '-05:00' : | ||
timezone === 'PDT' ? '-07:00' : | ||
timezone === 'PST' ? '-08:00' : '-00:00'; | ||
return date.toISOString().replace('Z', offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fear that sometimes we're in australia
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and europe for that matter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blame cursor for being very america-forward
main: | ||
# Webinar title. | ||
title: "${title}" | ||
event_type: workshop # workshop | event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we want this to work for in-person (which it easily could) this should be var'd
duration: ${duration} | ||
|
||
# "virtual" will be shown under "show virtual events only", otherwise shown as City, State (seattle, wa) | ||
location: virtual |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above re:in-person
# Name of the event, <= 60 characters | ||
title: "Testing this sworkshop script!" | ||
meta_desc: This is a great meta description, it should be long enough. | ||
meta_image: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay to be empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i think basically any field can be empty and it will just be omitted from the rendered pages - cc @shughes26 to double check me on that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, there's a default it falls back to if it's not set (on these pages it usually isn't), and adding it in after the fact is something that doesn't usually require eng support
if (title.length > 60) { | ||
return `❌ Title is ${title.length} characters (max 60). Please shorten it.`; | ||
} | ||
return `✅ Title is ${title.length} characters (within 60 limit)`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it matter to users if they know their input was within char bounds? Perhaps a brief "✅ Title" would suffice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The character limit is good to reiterate
const salesforceCampaignId = await askQuestion('📊 Salesforce Campaign ID: '); | ||
|
||
// Create folder and file | ||
const slug = createSlug(title); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check if slug exists and randomize if so? Low chance, but still possible no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, but not randomize as the slug matters for SEO. Check if it exists, and then maybe a message to go and edit the existing slug file directly (a common pattern to reuse old ones) or pick something else if the existing one is still upcoming
|
||
// Get basic info | ||
let title = await askQuestion('📝 Event Title: '); | ||
while (title.length > 60) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitty nit, but we can make the validations into consts, like TITLE_MAX_LENGTH
console.log('🚀 Pulumi Event/Workshop File Creator\n'); | ||
|
||
const fileType = await askQuestion('What would you like to create? (workshop/event): '); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitty nit nit, perhaps the name of this file should be create-file.js
under /workshopAndEvents
, as it handles both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dooope
@kimberleyamackenzie can we merge this? |
@meagancojocar I still need to incorporate the feedback Shoes gave - this is a nice to have to try and help folks add their own events, so it fell a little lower in my pile. Will get it done this iteration! |
Still testing :)