Skip to content

Commit

Permalink
Merge ab12ba8 into 05092d5
Browse files Browse the repository at this point in the history
  • Loading branch information
Xintong Xia committed Oct 29, 2019
2 parents 05092d5 + ab12ba8 commit 0258e89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion website/contents/pages.js
@@ -1,3 +1,5 @@
const PRE_MATCH_REGEX = /(GeoJson|3D|API|DeckGL|JSON)/g;

function getDocUrl(filename) {
// DOCS_DIR specified in webpack config file
// eslint-disable-next-line no-undef
Expand All @@ -19,9 +21,15 @@ function generatePath(tree, parentPath = '', depth = 0) {

tree.depth = depth;
if (tree.name) {
// pre-match GeoJson|3D|API|DeckGL|JSON
// use `#` to take up pre-matched' space
// then replace `#` with pre-match results
const matches = tree.name.match(PRE_MATCH_REGEX);
tree.path = tree.name
.match(/(GeoJson|3D|API|DeckGL|JSON|[A-Z]*[a-z'0-9\.]+|\d+)/g)
.replace(PRE_MATCH_REGEX, '#')
.match(/(#|[A-Z]*[a-z'0-9\.]+|\d+)/g)
.join('-')
.replace('#', _ => matches.shift())
.toLowerCase()
.replace(/[^\w-]/g, '');
}
Expand Down
2 changes: 1 addition & 1 deletion website/src/static/markdown/examples.md
Expand Up @@ -94,7 +94,7 @@
</div>
<div class="thumb">
<div class="bg-black" data-title="Melbourne Point Cloud" data-name="Tile3DLayer">
<a href="#/examples/core-layers/tile3-dlayer">
<a href="#/examples/core-layers/tile-3d-layer">
<img src="images/demo-thumb-3d-tiles.jpg" />
</a>
</div>
Expand Down

0 comments on commit 0258e89

Please sign in to comment.