Merge pull request #326 from carpentries/callout-margins
authorRaniere Silva <raniere@rgaiacs.com>
Wed, 15 Aug 2018 16:05:18 +0000 (17:05 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Aug 2018 16:05:18 +0000 (17:05 +0100)
space out callout elements better

Makefile
_layouts/base.html
bin/boilerplate/CODE_OF_CONDUCT.md [deleted file]
bin/boilerplate/_config.yml
bin/lesson_initialize.py

index f0b73e6064bf52e64c6c27967a70c81a21cc2d89..5ee09806c43fdbf2cf8e337211a22f69f664b440 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ clean :
        @find . -name '*.pyc' -exec rm {} \;
 
 ## clean-rmd        : clean intermediate R files (that need to be committed to the repo).
-clear-rmd :
+clean-rmd :
        @rm -rf ${RMD_DST}
        @rm -rf fig/rmd-*
 
index 99d6567434a839aaeb0ad1f08f701c1483098af9..8a2e4b5134a8857d377f6bd7c2e7bc3a2cfaf119 100644 (file)
@@ -1,5 +1,21 @@
 ---
 ---
+
+{% comment %}
+When rendering websites locally, `site.github.url` doesn't get resolved
+properly unless GitHub PAT are set up and available in the environment.
+This leads to warnings and errors when trying to serve the site locally.
+To work around this, we use the `jekyll.environment` variable which is set to
+`development` when rendering the site locally, and set to `production` on
+GitHub where `site.github.url` will be defined.
+{% endcomment %}
+
+{% if jekyll.environment == "development" %}
+{% assign search_domain_url = "" %}
+{% elsif jekyll.environment == "production" %}
+{% assign search_domain_url = site.github.url  %}
+{% endif %}
+
 <!doctype html>
 <html lang="en">
   <head>
@@ -8,7 +24,7 @@
     <meta http-equiv="last-modified" content="{{ site.time }}">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <!-- meta "search-domain" used for google site search function google_search() -->
-    <meta name="search-domain" value="{{ site.github.url }}">
+    <meta name="search-domain" value="{{ search_domain_url }}">
     <link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/bootstrap.css" />
     <link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/bootstrap-theme.css" />
     <link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/lesson.css" />
diff --git a/bin/boilerplate/CODE_OF_CONDUCT.md b/bin/boilerplate/CODE_OF_CONDUCT.md
deleted file mode 100644 (file)
index c3b9669..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
----
-layout: page
-title: "Contributor Code of Conduct"
----
-As contributors and maintainers of this project,
-we pledge to follow the [Carpentry Code of Conduct][coc].
-
-Instances of abusive, harassing, or otherwise unacceptable behavior
-may be reported by following our [reporting guidelines][coc-reporting].
-
-{% include links.md %}
index c98cb184c94df8921357ea344cc8e61a08a92777..795a35c390ef52cffed2dc6bcc3c384eacde461f 100644 (file)
@@ -45,9 +45,16 @@ workshop_repo: "https://github.com/carpentries/workshop-template"
 workshop_site: "https://carpentries.github.io/workshop-template"
 
 # Surveys.
-pre_survey: "https://www.surveymonkey.com/r/swc_pre_workshop_v1?workshop_id="
-post_survey: "https://www.surveymonkey.com/r/swc_post_workshop_v1?workshop_id="
+swc_pre_survey: "https://www.surveymonkey.com/r/swc_pre_workshop_v1?workshop_id="
+swc_post_survey: "https://www.surveymonkey.com/r/swc_post_workshop_v1?workshop_id="
 training_post_survey: "https://www.surveymonkey.com/r/post-instructor-training"
+dc_pre_survey: "https://www.surveymonkey.com/r/dcpreworkshopassessment?workshop_id="
+dc_post_survey: "https://www.surveymonkey.com/r/dcpostworkshopassessment?workshop_id="
+lc_pre_survey: "https://www.surveymonkey.com/r/lcpreworkshopsurvey?workshop_id="
+lc_post_survey: "https://www.surveymonkey.com/r/lcpostworkshopsurvey?workshop_id="
+instructor_pre_survey: "https://www.surveymonkey.com/r/instructor_training_pre_survey?workshop_id="
+instructor_post_survey: "https://www.surveymonkey.com/r/instructor_training_post_survey?workshop_id="
+
 
 # Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am).
 start_time: 0
index a96ba383a4046c39527d771872e6158867e502ba..a5eb6d05c63df3ba1d757b00b920241db3907b30 100755 (executable)
@@ -11,7 +11,6 @@ BOILERPLATE = (
     '.travis.yml',
     'AUTHORS',
     'CITATION',
-    'CODE_OF_CONDUCT.md',
     'CONTRIBUTING.md',
     'README.md',
     '_config.yml',