Skip to content

Commit e33d60e

Browse files
authored
Merge branch 'master' into DOC-244
2 parents c1b1f67 + 0c6110e commit e33d60e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+42027
-14719
lines changed

Makefile

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,30 @@ package: build
4949
serve: package
5050
@docker run -p 4000:80 segment-docs:latest
5151

52+
# gives us user-transparent way to swap between two different systems
5253
.PHONY: catalog
53-
catalog: vendor/bundle
54-
@node scripts/catalog.js
54+
catalog: catalog-papi
55+
56+
# uses the old configapi
57+
.PHONY: capi
58+
capi: vendor/bundle
59+
@node scripts/catalog-capi.js
60+
61+
# shorter alias
62+
.PHONY: catalog-capi
63+
catalog-capi: vendor/bundle
64+
@node scripts/catalog-capi.js
65+
66+
# uses the new public api
67+
.PHONY: catalog-papi
68+
catalog-papi: vendor/bundle
69+
@node scripts/catalog_papi.js
70+
71+
# shorter alias
72+
.PHONY: papi
73+
papi: vendor/bundle
74+
@node scripts/catalog_papi.js
75+
5576

5677
.PHONY: changelog
5778
changelog: vendor/bundle

_config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,16 @@ algolia:
5555
index_name: segment-docs
5656
files_to_exclude:
5757
- _release_notes/*
58+
- utils/*
5859
nodes_to_index: 'p, table#limit'
60+
settings:
61+
customRanking:
62+
- desc(title)
63+
- desc(custom_ranking.heading)
64+
- asc(custom_ranking.position)
65+
attributesForFaceting:
66+
- searchable(categories)
67+
- searchable(hidden)
68+
- searchable(tags)
69+
- searchable(title)
70+
- type

js/headings-anchors/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import ClipboardJS from 'clipboard'
22
import tippy from 'tippy.js'
33

44
const COMPONENT_SELECTOR = '[data-headings-anchors]'
5-
const HEADINGS_SELECTOR = 'h1, h2, h3, h4, h5'
5+
const HEADINGS_SELECTOR = 'h1, h2, h3, h4, h5, .def'
66

77
export default function () {
88
const components = document.querySelectorAll(COMPONENT_SELECTOR)

scripts/catalog.js renamed to scripts/catalog_capi.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,14 @@ const updateSources = async () => {
304304
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
305305
output += "# sources last updated " + todayDate + " \n";
306306
output += yaml.safeDump({ items: sourcesUpdated }, options);
307-
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/sources.yml`), output);
307+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/sources_capi.yml`), output);
308308

309309
// Create source-category mapping yaml file
310310
var todayDate = new Date().toISOString().slice(0,10);
311311
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
312312
output += "# source cateogries last updated " + todayDate + " \n";
313313
output += yaml.safeDump({ items: sourceCategories }, options);
314-
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/source_categories.yml`), output);
314+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/source_categories_capi.yml`), output);
315315
}
316316

317317
const updateDestinations = async () => {
@@ -414,14 +414,14 @@ const updateDestinations = async () => {
414414
var todayDate = new Date().toISOString().slice(0,10);
415415
output += "# destination data last updated " + todayDate + " \n";
416416
output += yaml.safeDump({ items: destinationsUpdated }, options);
417-
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destinations.yml`), output);
417+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destinations_capi.yml`), output);
418418

419419
// Create destination-category mapping yaml file
420420
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
421421
var todayDate = new Date().toISOString().slice(0,10);
422422
output += "# destination categories last updated " + todayDate + " \n";
423423
output += yaml.safeDump({ items: destinationCategories }, options);
424-
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destination_categories.yml`), output);
424+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destination_categories_capi.yml`), output);
425425
}
426426

427427
updateSources()

0 commit comments

Comments
 (0)