Update salt install doc to link to 2.2 branch.
[arvados.git] / doc / Rakefile
index ce448d56e8d0ea5988b3a9c8607204963f8a51e2..2b4b6af2e0cb2385a95835033fc69c90c5dd8ce3 100644 (file)
@@ -8,6 +8,16 @@
 # generating the documentation for the SDKs, which (the R docs
 # especially) take a fair bit of time and slow down the edit-preview
 # cycle.
+#
+# To generate and view the documentation locally, run this command
+#
+#   rake && sensible-browser .site/index.html
+#
+# Or alternatively:
+#
+#   baseurl=http://localhost:8000 rake && rake run
+#
+# and then visit http://localhost:8000 in a browser.
 
 require "rubygems"
 require "colorize"
@@ -20,6 +30,15 @@ end
 
 task :generate => [ :realclean, 'sdk/python/arvados/index.html', 'sdk/R/arvados/index.html', 'sdk/java-v2/javadoc/index.html' ] do
   vars = ['baseurl', 'arvados_cluster_uuid', 'arvados_api_host', 'arvados_workbench_host']
+  if ! ENV.key?('baseurl') || ENV['baseurl'] == ""
+    if !ENV.key?('WORKSPACE') || ENV['WORKSPACE'] == ""
+      puts "The `baseurl` variable was not specified and the `WORKSPACE` environment variable is not set. Defaulting `baseurl` to file://#{pwd}/.site"
+      ENV['baseurl'] = "file://#{pwd}/.site/"
+    else
+      puts "The `baseurl` variable was not specified, defaulting to a value derived from the `WORKSPACE` environment variable"
+      ENV['baseurl'] = "file://#{ENV['WORKSPACE']}/doc/.site/"
+    end
+  end
   vars.each do |v|
     if ENV[v]
       website.config.h[v] = ENV[v]
@@ -159,7 +178,7 @@ task :import_vscode_training do
 ---
 layout: default
 navsection: userguide
-title: "Developing Workflows with VSCode"
+title: "Developing CWL Workflows with VSCode"
 ...
 {% comment %}
 Copyright (C) The Arvados Authors. All rights reserved.