Skip to content

Conversation

kimberleyamackenzie
Copy link
Contributor

Still testing :)

@pulumi-bot
Copy link
Collaborator

name: "${title}"
start_date: ${sortableDate}
end_date: ${endDate}
url: "https://www.pulumi.com/resources/${slug}/"
Copy link
Contributor

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

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 call, ty!!

timezone === 'EST' ? '-05:00' :
timezone === 'PDT' ? '-07:00' :
timezone === 'PST' ? '-08:00' : '-00:00';
return date.toISOString().replace('Z', offset);
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor

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:

Choose a reason for hiding this comment

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

Okay to be empty?

Copy link
Contributor Author

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

Copy link
Contributor

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)`;

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?

Copy link
Contributor

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);

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?

Copy link
Contributor

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) {

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): ');

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

Copy link

@tomkingkong tomkingkong left a comment

Choose a reason for hiding this comment

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

Dooope

@meagancojocar
Copy link
Collaborator

@kimberleyamackenzie can we merge this?

@kimberleyamackenzie
Copy link
Contributor Author

@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!

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

Successfully merging this pull request may close these issues.

5 participants