styles icon indicating copy to clipboard operation
styles copied to clipboard

Reference page

Open maxim-belkin opened this issue 5 years ago • 6 comments

Reference page is used frequently in all episodes, so it might make sense to create a variable for it. Where can we do that and what should we call it?

CC @fmichonneau @rgaiacs

maxim-belkin avatar Jun 02 '19 07:06 maxim-belkin

that would be useful. A possible issue that would limit its use is that I don't think it's possible to combine markdown variables and anchors (i.e., [foo][reference-page]#foo doesn't work).

fmichonneau avatar Jun 03 '19 14:06 fmichonneau

If we create a variable (e.g. reference_page), we would then be able to do things like:

[assign]({{ reference_page }}#assign) 

I did this in my local copy of python-novice-inflammation but I did this in the episode file itself. That's why I asked about where to create it (this variable) and what to call it.

maxim-belkin avatar Jun 03 '19 16:06 maxim-belkin

A Jekyll variable makes sense. It seems that adding it to links.md would be a natural fit. Would it work there? I think reference_page works well as a name for this.

fmichonneau avatar Jun 04 '19 09:06 fmichonneau

It doesn't work if it is included in links.md and links.md included at the end of the episode file...

maxim-belkin avatar Jun 04 '19 11:06 maxim-belkin

Could we move links.md at the top of the pages? and even put the include statement in one of the _layouts (base.html?) so maintainers don't have to manually include it in each file?

fmichonneau avatar Jun 04 '19 16:06 fmichonneau

Could we move links.md at the top of the pages?

Yes. We would have to update the check that requires this statement to be at the end of the file (this is easy).

and even put the include statement in one of the _layouts (base.html?) so maintainers don't have to manually include it in each file?

I don't think we can include the content of links.md in HTML files in _layouts folder becase {{ content }} there is already in HTML form. We'll have to look deeper into how to append the content of links.md to every file.

I glanced at the usage of links.md in swcarpentry/python-novice-inflammation and... none of the episodes actually uses any of the links defined in links.md.

I then looked at all of the lessons, and none of the links defined in links.md are used in SWC lesson except for:

  • jupyter (in python-novice-gapminder in 01-run-quit.md)
  • pandoc (in r-novice-inflammation in 07-knitr-R.md)
  • rstudio (in git-novice in 14-supplemental-rstudio.md)
  • swc-lessons (in r-novice-inflammation in 06-best-practices-R.Rmd)

I did not parse data/lib carpentry's lessons.

maxim-belkin avatar Jun 04 '19 17:06 maxim-belkin