AuthorCarpentry / lesson-template

Lesson template for author carpentry content
http://authorcarpentry.github.io/lesson-template
Other
1 stars 0 forks source link

Assign html attributes in markdown for CSS styling #2

Open adam3smith opened 7 years ago

adam3smith commented 7 years ago

While working through Data Carpentry lessons, one thing that works really well is the embedded solutions that are collapsed such as here: http://www.datacarpentry.org/OpenRefine-ecology-lesson/01-working-with-openrefine/#solution

They do this by assigning an id attribute in the markdown (see e.g. https://github.com/datacarpentry/OpenRefine-ecology-lesson/blob/gh-pages/_episodes/01-working-with-openrefine.md#solution

And then hiding that by default via the CSS. Is that something we would want to do? And if so how can we do this?

tmorrell commented 7 years ago

I like that formatting, but we'd have to build the feature into mkpage. I've created a feature request. https://github.com/caltechlibrary/mkpage/issues/2

For now, we can format challenge questions as:

> ## Headline
>
> Question Text
> 
> > ## Solution
> > 
> > Solution test
> >

Which will render fairly cleanly. I've put an example in the template https://authorcarpentry.github.io/lesson-template/00-getting-started.html Once we add the question formatting we can go back and add the {.solution},{.challenge} formatting tags.