diff --git a/package.json b/package.json
index e159e8b710..8d47d7d34c 100644
--- a/package.json
+++ b/package.json
@@ -44,6 +44,7 @@
"build:toc": "yarn build:jekyll && scripts/generate-toc",
"build:site": "rollup -c site/rollup.config.js",
"build:jekyll": "pushd site && bundle exec jekyll build -q && popd",
+ "build:docset": "pushd site && bundle exec jekyll build -c _config_docset.yml -q && popd",
"build:versions": "scripts/update-version.sh",
"clean": "yarn clean:build && del-cli 'site/data/*' 'examples/compiled/*.png' && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete",
"clean:build": "del-cli 'build/*' !build/vega-lite-schema.json",
@@ -53,6 +54,7 @@
"schema": "mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/",
"renameschema": "scripts/rename-schema.sh",
"presite": "yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh",
+ "docset": "yarn schema && yarn build:site && yarn build:docset && yarn build:versions && scripts/create-example-pages.sh",
"site": "yarn site:only",
"site:only": "pushd site && bundle exec jekyll serve -I -l && popd",
"prettierbase": "prettier '**/*.{md,css,yml}'",
diff --git a/site/_config.yml b/site/_config.yml
index 35de4a2c82..74af815af3 100644
--- a/site/_config.yml
+++ b/site/_config.yml
@@ -12,6 +12,7 @@ exclude:
- Gemfile
- Gemfile.lock
- static/*.ts
+is_docset_build: false # Control behaviors that make it easier to replace absolute with relative paths for offline friendly builds. False for deploying to the public docs.
markdown: kramdown
highlighter: none
diff --git a/site/_config_docset.yml b/site/_config_docset.yml
new file mode 100644
index 0000000000..4dd8d015ba
--- /dev/null
+++ b/site/_config_docset.yml
@@ -0,0 +1,35 @@
+# Config for building a docset
+# For usage: https://github.com/hydrosquall/vega-lite-docset-generator
+
+title: Vega-Lite
+description: N/A
+
+# Alternative: Rewrite the paths to relative URLs locally
+# None of these worked when simply applied to base.html, so I ended up transforming
+# the base URL in my python script instead. Leaving notes in here for posterity.
+# https://ricostacruz.com/til/relative-paths-in-jekyll
+# https://gist.github.com/Ketrel/1f36fca6b4148f7263b3ee8fdb0923e7
+# https://github.com/jekyll/jekyll/issues/6360
+
+baseurl: 'DOCSET_BASE_TO_REPLACE' # the subpath of your site, e.g. /blog/
+url: 'https://vega.github.io' # the base hostname & protocol for your site
+is_docset_build: true
+twitter:
+ username: vega_vis
+exclude:
+ - Gemfile
+ - Gemfile.lock
+ - static/*.ts
+
+markdown: kramdown
+highlighter: none
+
+kramdown:
+ input: GFM
+ auto_id_stripping: true
+ syntax_highlighter_opts:
+ disable: true
+
+plugins:
+ - jekyll-mentions
+ - jekyll-redirect-from
diff --git a/site/_data/versions.yml b/site/_data/versions.yml
index 87f84a3beb..6e3d9329c4 100644
--- a/site/_data/versions.yml
+++ b/site/_data/versions.yml
@@ -1,4 +1,4 @@
vega: 5.20.2
vega-lite: 5.1.0
vega-embed: 6.18.2
-vega-tooltip: 0.25.1
+vega-tooltip: 0.27.0
diff --git a/site/_layouts/base.html b/site/_layouts/base.html
index 54156d76e7..71cd80fcee 100644
--- a/site/_layouts/base.html
+++ b/site/_layouts/base.html
@@ -7,11 +7,16 @@
- {% seo %}
-
+ {% if site.is_docset_build == true %}
+
+ {% else %} {% seo %}
+ {% endif %}
diff --git a/site/_layouts/page_submenu.html b/site/_layouts/page_submenu.html
index 99bb6584c3..7f1c8be3b5 100644
--- a/site/_layouts/page_submenu.html
+++ b/site/_layouts/page_submenu.html
@@ -25,7 +25,7 @@
{% else %}