Skip to content

Commit

Permalink
docs: update docset build to fetch data samples from absolute instead…
Browse files Browse the repository at this point in the history
… of relative URL
  • Loading branch information
hydrosquall committed Aug 9, 2021
1 parent 7de7f26 commit 1b0421e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +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",
"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}'",
Expand Down
4 changes: 2 additions & 2 deletions site/_layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

{% if site.is_docset_build == true %}
<script>
// This is used for data fetching in code samples, we know exactly where this lives
const BASEURL = '{{site.baseurl}}';
// Docset doesn't serve JSON from a fileserver, so it needs to load data from github
const BASEURL = 'https://vega.github.io/vega-lite/';
</script>
{% else %} {% seo %}
<script>
Expand Down
2 changes: 1 addition & 1 deletion site/_layouts/plain.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<header>
<nav class="page-centered">
<div class="dropdown">
<a class="vl-title" href="{{ site.baseurl }}/index.html">{{ site.title }}</a>
<a class="vl-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
<div class="dropdown-content">
<a href="https://vega.github.io/vega/">Vega</a>
<a href="https://altair-viz.github.io/">Altair</a>
Expand Down

0 comments on commit 1b0421e

Please sign in to comment.