workshop-template icon indicating copy to clipboard operation
workshop-template copied to clipboard

Add slug check

Open froggleston opened this issue 1 year ago • 2 comments

Currently when building a workshop website, there is no check to validate a repository name as a slug. This PR adds a check that will fail if the repo name does not match YYYY-MM-DD-[ttt|site][-format] if the carpentry specified in the _config.yaml is one of our official lesson programs, or cp for TTT.

froggleston avatar Jun 27 '24 12:06 froggleston

For added context, https://github.com/carpentries/styles/issues/551 should no longer apply - this template should only now be used for workshop websites and not lessons.

froggleston avatar Jun 27 '24 14:06 froggleston

@froggleston thanks for contributing this. The equivalent check should also be added to https://github.com/carpentries/training-template/, I think?

tobyhodges avatar Jun 28 '24 13:06 tobyhodges

Deploy Preview for workshop-template-previews ready!

Name Link
Latest commit cc0987e31359f94280baafd8c381f226716f398e
Latest deploy log https://app.netlify.com/sites/workshop-template-previews/deploys/668e7b401021ed0008cd5110
Deploy Preview https://deploy-preview-831--workshop-template-previews.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jul 09 '24 17:07 netlify[bot]

cp carpentries workshops can be used for incubator workshops, which may or may not have a valid slug. So, when using cp give a warning if the slug isn't valid, but do not fail.

froggleston avatar Jul 09 '24 17:07 froggleston

@froggleston thanks for contributing this. The equivalent check should also be added to https://github.com/carpentries/training-template/, I think?

Yup, I'll work on this tomorrow!

froggleston avatar Jul 09 '24 21:07 froggleston