Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Hugo
public/*
public_local/*
!public/.gitkeep
data/service_checks/
data/npm
Expand Down
30 changes: 30 additions & 0 deletions config/searchonly/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
disableLanguages:
- fr
- ja
- ko
- es

module:
mounts:
- source: content/en/api
target: content/api
lang: en
- source: layouts
target: layouts
excludeFiles:
- 'shortcodes/.cdocs_temp/*'
- 'shortcodes/mdoc/*'
- source: data
target: data
- source: i18n
target: i18n
- source: static
target: static
- source: static
target: assets
- source: assets
target: assets
- source: "./node_modules/@datadog/browser-rum/bundle/datadog-rum.js"
target: "assets/node_modules/datadog-rum.js"
- source: "./node_modules/@datadog/browser-logs/bundle/datadog-logs.js"
target: "assets/node_modules/datadog-logs.js"
19 changes: 16 additions & 3 deletions layouts/_default/list.search.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,24 @@
{{ $.Scratch.Add "algoliaindex" slice }}
{{ $section := $.Site.GetPage "section" .Section }}
{{ $hugo_context := . }}
{{ $apiPagesWithoutTypeAPI := slice "api/latest/" "api/latest/rate-limits/" "api/latest/scopes/" }}

{{ range (where (where (where .Site.AllPages "Kind" "!=" "home") "Type" "!=" "api") ".RelPermalink" "not in" $apiPagesWithoutTypeAPI) }}
{{- /*
Static API pages live under /api/ and carry `type: api`, but they have markdown
bodies that should be indexed alongside other documentation. Generated API
endpoint pages keep being indexed by api-pages-full-index.json.
*/ -}}
{{ $apiStaticPages := slice "/api/latest/" "/api/latest/using-the-api/" "/api/latest/rate-limits/" "/api/latest/scopes/" }}

{{ range (where .Site.AllPages "Kind" "!=" "home") }}
{{ $page := . }}
{{ if and ($page.IsDescendant $section) (ne $page.Params.type "partners") (ne $page.Params.private true) (not (in $page.RelPermalink "/faq")) (not $page.Draft) (not (isset .Params "external_redirect")) }}

{{- $comparePath := $page.RelPermalink -}}
{{- if ne $page.Language.Lang "en" -}}
{{- $comparePath = strings.TrimPrefix (printf "/%s" $page.Language.Lang) $comparePath -}}
{{- end -}}
{{- $isApiStatic := in $apiStaticPages $comparePath -}}

{{ if and (or (ne $page.Type "api") $isApiStatic) ($page.IsDescendant $section) (ne $page.Params.type "partners") (ne $page.Params.private true) (not (in $page.RelPermalink "/faq")) (not $page.Draft) (not (isset .Params "external_redirect")) }}
{{- /* Generate unique ID for each page. Use file path when available, fallback to RelPermalink for pages without files (e.g. virtual pages). This avoids duplicate IDs while preserving existing IDs for 300k+ items. */ -}}
{{ $rel_path := "" }}
{{ with $page.File }}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@popperjs/core": "^2.11.8",
"alpinejs": "^3.13.7",
"bootstrap": "^5.2",
"cdocs-hugo-integration": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/cdocs-hugo-integration-v4.4.0.tgz",
"cdocs-hugo-integration": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/cdocs-hugo-integration-v4.2.0.tgz",
"del": "4.1.1",
"fancy-log": "^1.3.3",
"geo-locate": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/geo-locate-v1.0.2.tgz",
Expand Down Expand Up @@ -83,7 +83,7 @@
"traverse": "0.6.8",
"typesense": "^3.0.1",
"typesense-instantsearch-adapter": "^2.9.0",
"typesense-sync": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/typesense-sync-v2.0.0.tgz",
"typesense-sync": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/reda.elissati/typesense-sync-streaming-fix-invalid-string/typesense-sync-v2.0.1-beta.5.tgz",
"yaml-lint": "^1.7.0"
},
"devDependencies": {
Expand Down
Loading
Loading