Skip rendering json file in example directory and remove hexo cache before build
Hexo will remove spaces and newlines when rendering a json file,
we need the spaces and newlines for our example, so ask Hexo to
skip rendering json files in example directory.
MODIFY
package.json
package.json
"stop-test": "forever stop ./testing/test-runners/server.js",
"docs": "jsdoc --pedantic -d dist/apidocs -r src -c jsdoc.conf.json",
"website": "cd website && npx hexo server",
- "build-website": "npm run build && cp -a dist/built/. website/source/built && npm run build-website-examples && npm run build-website-tutorials && npm run docs && cp -a dist/apidocs/. website/source/apidocs && cd website && npx hexo generate"
+ "build-website": "npm run build && cp -a dist/built/. website/source/built && npm run build-website-examples && npm run build-website-tutorials && npm run docs && cp -a dist/apidocs/. website/source/apidocs && cd website && rm -f db.json && npx hexo generate"
},
"keywords": [
"map",

MODIFY
website/_config.yml
website/_config.yml
@@ -20,13 +20,9 @@ permalink_defaults:
# Directory
source_dir: source
public_dir: public
-tag_dir: tags
-archive_dir: archives
-category_dir: categories
-code_dir: downloads/code
-i18n_dir: :lang
skip_render:
- "**/*.js"
+ - "examples/*/*.json"
- "data/**/*"
- "apidocs/**/*"

MODIFY
website/source/_data/examples.yml
website/source/_data/examples.yml
+- name: hurricanes
+ title: Hurricane tracking data
+ description: Explore historic hurricane paths since 1980 on an interactive map.
+
- name: heatmap
title: Heatmap Feature
description: This example shows how to add a heatmap to a map.
title: Deepzoom tiled image example
description: Rendering a tiled image using the Deepzoom protocol.
-- name: hurricanes
- title: Hurricane tracking data
- description: Explore historic hurricane paths since 1980 on an interactive map.
-
- name: annotations
title: Annotation Layer
description: Add annotations, such as marked rectangles, to a map.

Skip rendering json file in example directory and remove hexo cache before build

Hexo will remove spaces and newlines when rendering a json file,
we need the spaces and newlines for our example, so ask Hexo to
skip rendering json files in example directory.