From 18eed47f69ef305b6923020b01c898f4269c38c3 Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sat, 7 Aug 2021 12:04:14 -0400 Subject: [PATCH 1/5] update initial version of vega-tooltip --- site/_data/versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 2dfa605986796046e213d277ac7a45cca079931a Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sat, 7 Aug 2021 21:45:14 -0400 Subject: [PATCH 2/5] docs: add custom config for docs site --- package.json | 2 ++ site/_config_docset.yml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 site/_config_docset.yml diff --git a/package.json b/package.json index e159e8b710..4aeb7d392d 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 data && 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_docset.yml b/site/_config_docset.yml new file mode 100644 index 0000000000..67a0a540f5 --- /dev/null +++ b/site/_config_docset.yml @@ -0,0 +1,36 @@ +# Config for building a docset +# Initially created by Dash, but supported by several OSS tools too +# (Velocity, Zeal, etc) + +title: Vega-Lite +description: Bare SEO for offline usage + +# removing baseurl b/c dash docsets don't work with absolute paths +# end up needing the +# if this doesn't work out, rewrite all link refs using BS4 later... + +# using https://ricostacruz.com/til/relative-paths-in-jekyll as workaround + +baseurl: '.' # the subpath of your site, e.g. /blog/ +url: 'https://vega.github.io' # the base hostname & protocol for your site +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-sitemap + # - jekyll-seo-tag + - jekyll-mentions + - jekyll-redirect-from From 7de7f265553e3ee10c91e668d94e50f0346adb6f Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sat, 7 Aug 2021 23:01:41 -0400 Subject: [PATCH 3/5] build: adjust links in site config to support file-system based documentation browsing --- site/_config.yml | 1 + site/_config_docset.yml | 3 ++- site/_layouts/base.html | 9 +++++++-- site/_layouts/plain.html | 6 +++--- 4 files changed, 13 insertions(+), 6 deletions(-) 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 index 67a0a540f5..10499e0a44 100644 --- a/site/_config_docset.yml +++ b/site/_config_docset.yml @@ -11,8 +11,9 @@ description: Bare SEO for offline usage # using https://ricostacruz.com/til/relative-paths-in-jekyll as workaround -baseurl: '.' # the subpath of your site, e.g. /blog/ +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: diff --git a/site/_layouts/base.html b/site/_layouts/base.html index 54156d76e7..439560dbff 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/plain.html b/site/_layouts/plain.html index 783ba9f07a..06b6e5bd59 100644 --- a/site/_layouts/plain.html +++ b/site/_layouts/plain.html @@ -6,7 +6,7 @@