lab-website-template
lab-website-template copied to clipboard
Make testbed
Make thorough testbed file for testing components.
Make sure there are fallbacks for all parameters, including providing empty lists. Make sure components work in all orders, on all screen sizes, etc
Also use this test bed as an opportunity to automatically generate screenshots of all the components to put in the documentation.
Maybe find a way to have Netlify build a special testbed.md that is hosted in a separate hidden place so the file doesn't clutter up the repo.
Deleted. See comment edit history for posterity.
Above is where I will keep/track the testbed code. I wrote this tool to convert and escape the above text into a single-line bash command that writes it to a testbed.md file:
https://jsfiddle.net/k0dqngrt/3/show
For posterity (in case the jsfiddle link goes away), the critical part is this
output.value =
"printf -- '" +
input.value
.replaceAll("\\", "\\\\")
.replaceAll("'", "'\\''")
.replaceAll("%", "%%")
.replaceAll("\n", "\\n")
.replaceAll("\r", "\\r")
.replaceAll("\t", "\\t") +
"' >> testbed.md";
Open the fiddle, paste the testbed code from the comment above, copy the generated command, and run that command before the jekyll build command on netlify. Retrigger the latest deploy on the Netlify production site. Then, a /testbed url should exist only on greenelab/lab-website-template, and only on Netlify (not gh-pages), which is the only place we need this.
Live Testbed Page
https://lab-website-template.netlify.app/testbed
Links to sections on this page are now incorporated into the wiki docs.
Instead of this crazy sed nonsense, I'm just going to include the testbed.md right in the repo, and remove the file with Actions when the user clones the repo. See #142 .