Merge pull request #202 from rgaiacs/gh-pages
authorRaniere Silva <raniere@rgaiacs.com>
Wed, 14 Feb 2018 17:29:00 +0000 (17:29 +0000)
committerGitHub <noreply@github.com>
Wed, 14 Feb 2018 17:29:00 +0000 (17:29 +0000)
Fix CSS to use .language-X class

LICENSE.md
_includes/lc/syllabus.html
_includes/links.md
_includes/navbar.html
bin/generate_md_episodes.R
bin/lesson_initialize.py

index e1075991773ef62626c0a813ba0f5e57e65e821c..0e87b5877a1cb3753b50851a10e70fb51568dd95 100644 (file)
@@ -78,6 +78,6 @@ are registered trademarks of [NumFOCUS][numfocus].
 
 [cc-by-human]: https://creativecommons.org/licenses/by/4.0/
 [cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode
-[mit-license]: http://opensource.org/licenses/mit-license.html
-[numfocus]: http://numfocus.org/
-[osi]: http://opensource.org
+[mit-license]: https://opensource.org/licenses/mit-license.html
+[numfocus]: https://numfocus.org/
+[osi]: https://opensource.org
index 4dc20776d4908e2d7c6703ba525073e90d4dcd25..e2c7012e071afedfdf6d0e91c101a6539ffe5e26 100644 (file)
@@ -8,7 +8,7 @@
       <li>Plain text formats</li>
       <li>Naming files</li>
       <li>Regular expressions</li>
-      <li><a href="http://data-lessons.github.io/library-data-intro/reference/">Reference...</a></li>
+      <li><a href="https://data-lessons.github.io/library-data-intro/reference/">Reference...</a></li>
     </ul>
   </div>
   <div class="col-md-6">
@@ -19,7 +19,7 @@
       <li>Counting and sorting contents in files</li>
       <li>Pipes and redirection</li>
       <li>Mining or searching in files</li>
-      <li><a href="http://data-lessons.github.io/library-shell/reference/">Reference...</a></li>
+      <li><a href="https://data-lessons.github.io/library-shell/reference/">Reference...</a></li>
     </ul>
   </div>
 
@@ -35,7 +35,7 @@
       <li>Viewing state changes with <code>status</code></li>
       <li>Working on the web: <code>clone</code>, <code>pull</code>, <code>push</code>, ...</li>
       <li>Where to host work, and why</li>
-      <li><a href="http://data-lessons.github.io/library-git/reference">Reference...</a></li>
+      <li><a href="https://data-lessons.github.io/library-git/reference">Reference...</a></li>
     </ul>
   </div>
   <div class="col-md-6">
@@ -46,7 +46,7 @@
         <li>Importing data</li>
         <li>Basic functions</li>
         <li>Advanced Functions</li>
-        <li><a href="http://data-lessons.github.io/library-openrefine/reference">Reference...</a></li>
+        <li><a href="https://data-lessons.github.io/library-openrefine/reference">Reference...</a></li>
       </ul>
     </div>
   </div>
@@ -62,7 +62,7 @@
       <li>Filtering with <code>where</code></li>
       <li>Combining values using aggregation</li>
       <li>Combining information from multiple tables using <code>join</code></li>
-      <li><a href="http://data-lessons.github.io//library-sql/reference/">Reference...</a></li>
+      <li><a href="https://data-lessons.github.io//library-sql/reference/">Reference...</a></li>
     </ul>
   </div>
 </div>
index 71ee7ee671a93f894865ecbd7552129cc5fc63e0..2dfecd6d64c58326df062a3ea08f82e8a82d389e 100644 (file)
@@ -1,8 +1,8 @@
 [cc-by-human]: https://creativecommons.org/licenses/by/4.0/
 [cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode
-[concept-maps]: http://carpentries.github.io/instructor-training/05-memory/
+[concept-maps]: https://carpentries.github.io/instructor-training/05-memory/
 [email]: mailto:lessons@software-carpentry.org
-[contrib-covenant]: http://contributor-covenant.org/
+[contrib-covenant]: https://contributor-covenant.org/
 [contributing]: {{ site.github.repository_url }}/blob/gh-pages/CONTRIBUTING.md
 [cran-checkpoint]: https://cran.r-project.org/web/packages/checkpoint/index.html
 [cran-knitr]: https://cran.r-project.org/web/packages/knitr/index.html
 [jekyll-windows]: http://jekyll-windows.juthilo.com/
 [jekyll]: https://jekyllrb.com/
 [jupyter]: https://jupyter.org/
-[mit-license]: http://opensource.org/licenses/mit-license.html
+[mit-license]: https://opensource.org/licenses/mit-license.html
 [morea]: https://morea-framework.github.io/
-[numfocus]: http://numfocus.org/
-[osi]: http://opensource.org
+[numfocus]: https://numfocus.org/
+[osi]: https://opensource.org
 [pandoc]: https://pandoc.org/
 [paper-now]: https://github.com/PeerJ/paper-now
 [python-gapminder]: https://swcarpentry.github.io/python-novice-gapminder/
 [r-markdown]: http://rmarkdown.rstudio.com/
 [rstudio]: https://www.rstudio.com/
 [ruby-install-guide]: https://www.ruby-lang.org/en/downloads/
-[ruby-installer]: http://rubyinstaller.org/
+[ruby-installer]: https://rubyinstaller.org/
 [rubygems]: https://rubygems.org/pages/download/
 [styles]: https://github.com/swcarpentry/styles/
-[training]: http://swcarpentry.github.io/instructor-training/
+[training]: https://swcarpentry.github.io/instructor-training/
 [workshop-repo]: {{ site.workshop_repo }}
 [yaml]: http://yaml.org/
 [coc]: https://software-carpentry.org/conduct/
index 31b2c65b755c9f5a834be824f29088b18c813df0..d4481859806775f325f312c303f21da4332629d7 100644 (file)
@@ -54,7 +54,7 @@
        {% endif %}
 
        {% comment %} Show extras for lessons or if this is the main workshop-template repo (where they contain documentation). {% endcomment %}
-       {% if site.kind == "lesson" or site.github.repository_name == "workshop-template" %}
+       {% if site.kind == "lesson" %}
         <li class="dropdown">
           <a href="{{ page.root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extras <span class="caret"></span></a>
           <ul class="dropdown-menu">
index 4ea9835037a81c7e9c657681b12c46cfa30b235f..6c27d9c9245fc5b6d1c5aaa82af2ea4073e59b80 100644 (file)
@@ -27,12 +27,26 @@ generate_md_episodes <- function() {
     ## find all the Rmd files, and generate the paths for their respective outputs
     src_rmd <- list.files(pattern = "??-*.Rmd$", path = "_episodes_rmd", full.names = TRUE)
     dest_md <- file.path("_episodes", gsub("Rmd$", "md", basename(src_rmd)))
-
+    
     ## knit the Rmd into markdown
     mapply(function(x, y) {
         knitr::knit(x, output = y)
     }, src_rmd, dest_md)
-
+    
+    # Read the generated md files and add comments advising not to edit them
+    vapply(dest_md, function(y) {
+      con <- file(y)
+      mdfile <- readLines(con)
+      if (mdfile[1] != "---")
+        stop("Input file does not have a valid header")
+      mdfile <- append(mdfile, "# Please do not edit this file directly; it is auto generated.", after = 1)
+      mdfile <- append(mdfile, paste("# Instead, please edit", 
+                                     basename(y), "in _episodes_rmd/"), after = 2)
+      writeLines(mdfile, con)
+      close(con)
+      return(paste("Warning added to YAML header of", y))
+    },
+    character(1))
 }
 
 generate_md_episodes()
index c513c52ed9fcbf7f787182b948d6cca72b065922..757779609994f62f9a0995cf64c41f8c447513de 100755 (executable)
@@ -158,15 +158,15 @@ You can also [reach us by email][email].
 [dc-lessons]: http://datacarpentry.org/lessons/
 [dc-site]: http://datacarpentry.org/
 [discuss-list]: http://lists.software-carpentry.org/listinfo/discuss
-[github]: http://github.com
+[github]: https://github.com
 [github-flow]: https://guides.github.com/introduction/flow/
 [github-join]: https://github.com/join
 [how-contribute]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
 [issues]: https://github.com/swcarpentry/FIXME/issues/
 [repo]: https://github.com/swcarpentry/FIXME/
 [swc-issues]: https://github.com/issues?q=user%3Aswcarpentry
-[swc-lessons]: http://software-carpentry.org/lessons/
-[swc-site]: http://software-carpentry.org/
+[swc-lessons]: https://software-carpentry.org/lessons/
+[swc-site]: https://software-carpentry.org/
 '''
 
 ROOT_CONFIG_YML = '''\
@@ -202,7 +202,7 @@ dc_site: "http://datacarpentry.org"
 swc_github: "https://github.com/swcarpentry"
 swc_site: "https://software-carpentry.org"
 swc_pages: "https://swcarpentry.github.io"
-lc_site: "http://librarycarpentry.github.io/"
+lc_site: "https://librarycarpentry.github.io/"
 template_repo: "https://github.com/swcarpentry/styles"
 example_repo: "https://github.com/swcarpentry/lesson-example"
 example_site: "https://swcarpentry.github.com/lesson-example"