Skip to content

Commit

Permalink
Merge branch 'next' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd authored Jun 14, 2022
2 parents 2287f17 + 6d9094f commit e1ad16d
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 127 deletions.
2 changes: 1 addition & 1 deletion packages/docsearch-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"scripts": {
"build:clean": "rm -rf ./dist",
"build:esm": "cross-env BUILD=esm rollup --config",
"build:types": "tsc -p ./tsconfig.declaration.json --outFile ./dist/esm/index.d.ts",
"build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/esm",
"build:umd": "cross-env BUILD=umd rollup --config",
"build": "yarn build:clean && yarn build:umd && yarn build:esm && yarn build:types",
"on:change": "concurrently \"yarn build:esm\" \"yarn build:types\"",
Expand Down
4 changes: 2 additions & 2 deletions packages/website/docs/record-extractor.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,13 @@ Custom variables are used to [`filter your search`](/docs/DocSearch-v3#filtering

> `type: boolean` | default: `true` | **optional**
[This options](#reduce-the-number-records) groups the Algolia records created at the `content` level of the selector into a single record for its matching heading.
[This option](#reduce-the-number-records) groups the Algolia records created at the `content` level of the selector into a single record for its matching heading.

### `recordVersion`

> `type: 'v3' | 'v2'` | default: `v2` | **optional**
[This options](#reduce-the-record-size) remove content from the Algolia records that are only used for [DocSearch v2](/docs/legacy/dropdown). If you are using [the latest version of DocSearch](/docs/DocSearch-v3), you can [set it to `v3`](#reduce-the-record-size).
This option remove content from the Algolia records that are only used for [DocSearch v2](/docs/legacy/dropdown). If you are using [the latest version of DocSearch](/docs/DocSearch-v3), you can [set it to `v3`](#reduce-the-record-size).

### `indexHeadings`

Expand Down
26 changes: 3 additions & 23 deletions packages/website/docs/required-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ new Crawler({
content: ['article p, article li', 'main p, main li', 'p, li'],
},
aggregateContent: true,
recordVersion: 'v3',
});
},
},
Expand All @@ -60,37 +61,16 @@ new Crawler({
'url_without_anchor',
'type',
],
attributesToHighlight: ['hierarchy', 'hierarchy_camel', 'content'],
attributesToHighlight: ['hierarchy', 'content'],
attributesToSnippet: ['content:10'],
camelCaseAttributes: ['hierarchy', 'hierarchy_radio', 'content'],
camelCaseAttributes: ['hierarchy', 'content'],
searchableAttributes: [
'unordered(hierarchy_radio_camel.lvl0)',
'unordered(hierarchy_radio.lvl0)',
'unordered(hierarchy_radio_camel.lvl1)',
'unordered(hierarchy_radio.lvl1)',
'unordered(hierarchy_radio_camel.lvl2)',
'unordered(hierarchy_radio.lvl2)',
'unordered(hierarchy_radio_camel.lvl3)',
'unordered(hierarchy_radio.lvl3)',
'unordered(hierarchy_radio_camel.lvl4)',
'unordered(hierarchy_radio.lvl4)',
'unordered(hierarchy_radio_camel.lvl5)',
'unordered(hierarchy_radio.lvl5)',
'unordered(hierarchy_radio_camel.lvl6)',
'unordered(hierarchy_radio.lvl6)',
'unordered(hierarchy_camel.lvl0)',
'unordered(hierarchy.lvl0)',
'unordered(hierarchy_camel.lvl1)',
'unordered(hierarchy.lvl1)',
'unordered(hierarchy_camel.lvl2)',
'unordered(hierarchy.lvl2)',
'unordered(hierarchy_camel.lvl3)',
'unordered(hierarchy.lvl3)',
'unordered(hierarchy_camel.lvl4)',
'unordered(hierarchy.lvl4)',
'unordered(hierarchy_camel.lvl5)',
'unordered(hierarchy.lvl5)',
'unordered(hierarchy_camel.lvl6)',
'unordered(hierarchy.lvl6)',
'content',
],
Expand Down
105 changes: 12 additions & 93 deletions packages/website/docs/templates.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ new Crawler({
selectors: '',
defaultValue: lvl0,
},
lvl1: 'header h1',
lvl1: ['header h1', 'article h1'],
lvl2: 'article h2',
lvl3: 'article h3',
lvl4: 'article h4',
Expand All @@ -215,6 +215,7 @@ new Crawler({
},
indexHeadings: true,
aggregateContent: true,
recordVersion: 'v3',
});
},
},
Expand All @@ -236,37 +237,16 @@ new Crawler({
'url_without_anchor',
'type',
],
attributesToHighlight: ['hierarchy', 'hierarchy_camel', 'content'],
attributesToHighlight: ['hierarchy', 'content'],
attributesToSnippet: ['content:10'],
camelCaseAttributes: ['hierarchy', 'hierarchy_radio', 'content'],
camelCaseAttributes: ['hierarchy', 'content'],
searchableAttributes: [
'unordered(hierarchy_radio_camel.lvl0)',
'unordered(hierarchy_radio.lvl0)',
'unordered(hierarchy_radio_camel.lvl1)',
'unordered(hierarchy_radio.lvl1)',
'unordered(hierarchy_radio_camel.lvl2)',
'unordered(hierarchy_radio.lvl2)',
'unordered(hierarchy_radio_camel.lvl3)',
'unordered(hierarchy_radio.lvl3)',
'unordered(hierarchy_radio_camel.lvl4)',
'unordered(hierarchy_radio.lvl4)',
'unordered(hierarchy_radio_camel.lvl5)',
'unordered(hierarchy_radio.lvl5)',
'unordered(hierarchy_radio_camel.lvl6)',
'unordered(hierarchy_radio.lvl6)',
'unordered(hierarchy_camel.lvl0)',
'unordered(hierarchy.lvl0)',
'unordered(hierarchy_camel.lvl1)',
'unordered(hierarchy.lvl1)',
'unordered(hierarchy_camel.lvl2)',
'unordered(hierarchy.lvl2)',
'unordered(hierarchy_camel.lvl3)',
'unordered(hierarchy.lvl3)',
'unordered(hierarchy_camel.lvl4)',
'unordered(hierarchy.lvl4)',
'unordered(hierarchy_camel.lvl5)',
'unordered(hierarchy.lvl5)',
'unordered(hierarchy_camel.lvl6)',
'unordered(hierarchy.lvl6)',
'content',
],
Expand Down Expand Up @@ -449,6 +429,7 @@ new Crawler({
},
indexHeadings: true,
aggregateContent: true,
recordVersion: 'v3',
});
},
},
Expand All @@ -457,37 +438,16 @@ new Crawler({
YOUR_INDEX_NAME: {
attributesForFaceting: ['type', 'lang'],
attributesToRetrieve: ['hierarchy', 'content', 'anchor', 'url'],
attributesToHighlight: ['hierarchy', 'hierarchy_camel', 'content'],
attributesToHighlight: ['hierarchy', 'content'],
attributesToSnippet: ['content:10'],
camelCaseAttributes: ['hierarchy', 'hierarchy_radio', 'content'],
camelCaseAttributes: ['hierarchy', 'content'],
searchableAttributes: [
'unordered(hierarchy_radio_camel.lvl0)',
'unordered(hierarchy_radio.lvl0)',
'unordered(hierarchy_radio_camel.lvl1)',
'unordered(hierarchy_radio.lvl1)',
'unordered(hierarchy_radio_camel.lvl2)',
'unordered(hierarchy_radio.lvl2)',
'unordered(hierarchy_radio_camel.lvl3)',
'unordered(hierarchy_radio.lvl3)',
'unordered(hierarchy_radio_camel.lvl4)',
'unordered(hierarchy_radio.lvl4)',
'unordered(hierarchy_radio_camel.lvl5)',
'unordered(hierarchy_radio.lvl5)',
'unordered(hierarchy_radio_camel.lvl6)',
'unordered(hierarchy_radio.lvl6)',
'unordered(hierarchy_camel.lvl0)',
'unordered(hierarchy.lvl0)',
'unordered(hierarchy_camel.lvl1)',
'unordered(hierarchy.lvl1)',
'unordered(hierarchy_camel.lvl2)',
'unordered(hierarchy.lvl2)',
'unordered(hierarchy_camel.lvl3)',
'unordered(hierarchy.lvl3)',
'unordered(hierarchy_camel.lvl4)',
'unordered(hierarchy.lvl4)',
'unordered(hierarchy_camel.lvl5)',
'unordered(hierarchy.lvl5)',
'unordered(hierarchy_camel.lvl6)',
'unordered(hierarchy.lvl6)',
'content',
],
Expand Down Expand Up @@ -558,6 +518,7 @@ new Crawler({
},
indexHeadings: true,
aggregateContent: true,
recordVersion: 'v3',
});
},
},
Expand All @@ -566,37 +527,16 @@ new Crawler({
YOUR_INDEX_NAME: {
attributesForFaceting: ['type', 'lang'],
attributesToRetrieve: ['hierarchy', 'content', 'anchor', 'url'],
attributesToHighlight: ['hierarchy', 'hierarchy_camel', 'content'],
attributesToHighlight: ['hierarchy', 'content'],
attributesToSnippet: ['content:10'],
camelCaseAttributes: ['hierarchy', 'hierarchy_radio', 'content'],
camelCaseAttributes: ['hierarchy', 'content'],
searchableAttributes: [
'unordered(hierarchy_radio_camel.lvl0)',
'unordered(hierarchy_radio.lvl0)',
'unordered(hierarchy_radio_camel.lvl1)',
'unordered(hierarchy_radio.lvl1)',
'unordered(hierarchy_radio_camel.lvl2)',
'unordered(hierarchy_radio.lvl2)',
'unordered(hierarchy_radio_camel.lvl3)',
'unordered(hierarchy_radio.lvl3)',
'unordered(hierarchy_radio_camel.lvl4)',
'unordered(hierarchy_radio.lvl4)',
'unordered(hierarchy_radio_camel.lvl5)',
'unordered(hierarchy_radio.lvl5)',
'unordered(hierarchy_radio_camel.lvl6)',
'unordered(hierarchy_radio.lvl6)',
'unordered(hierarchy_camel.lvl0)',
'unordered(hierarchy.lvl0)',
'unordered(hierarchy_camel.lvl1)',
'unordered(hierarchy.lvl1)',
'unordered(hierarchy_camel.lvl2)',
'unordered(hierarchy.lvl2)',
'unordered(hierarchy_camel.lvl3)',
'unordered(hierarchy.lvl3)',
'unordered(hierarchy_camel.lvl4)',
'unordered(hierarchy.lvl4)',
'unordered(hierarchy_camel.lvl5)',
'unordered(hierarchy.lvl5)',
'unordered(hierarchy_camel.lvl6)',
'unordered(hierarchy.lvl6)',
'content',
],
Expand Down Expand Up @@ -748,37 +688,16 @@ new Crawler({
'url',
'url_without_anchor',
],
attributesToHighlight: ['hierarchy', 'hierarchy_camel', 'content'],
attributesToHighlight: ['hierarchy', 'content'],
attributesToSnippet: ['content:10'],
camelCaseAttributes: ['hierarchy', 'hierarchy_radio', 'content'],
camelCaseAttributes: ['hierarchy', 'content'],
searchableAttributes: [
'unordered(hierarchy_radio_camel.lvl0)',
'unordered(hierarchy_radio.lvl0)',
'unordered(hierarchy_radio_camel.lvl1)',
'unordered(hierarchy_radio.lvl1)',
'unordered(hierarchy_radio_camel.lvl2)',
'unordered(hierarchy_radio.lvl2)',
'unordered(hierarchy_radio_camel.lvl3)',
'unordered(hierarchy_radio.lvl3)',
'unordered(hierarchy_radio_camel.lvl4)',
'unordered(hierarchy_radio.lvl4)',
'unordered(hierarchy_radio_camel.lvl5)',
'unordered(hierarchy_radio.lvl5)',
'unordered(hierarchy_radio_camel.lvl6)',
'unordered(hierarchy_radio.lvl6)',
'unordered(hierarchy_camel.lvl0)',
'unordered(hierarchy.lvl0)',
'unordered(hierarchy_camel.lvl1)',
'unordered(hierarchy.lvl1)',
'unordered(hierarchy_camel.lvl2)',
'unordered(hierarchy.lvl2)',
'unordered(hierarchy_camel.lvl3)',
'unordered(hierarchy.lvl3)',
'unordered(hierarchy_camel.lvl4)',
'unordered(hierarchy.lvl4)',
'unordered(hierarchy_camel.lvl5)',
'unordered(hierarchy.lvl5)',
'unordered(hierarchy_camel.lvl6)',
'unordered(hierarchy.lvl6)',
'content',
],
Expand Down
17 changes: 9 additions & 8 deletions packages/website/src/components/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function Home() {
<p className="mt-2 text-base leading-6 text-description">
First built to fulfill our own developers' needs,
DocSearch quickly evolved as a successful community
project. Over the years, the project kept on adressing
project. Over the years, the project kept on addressing
the complex challenge of search for the open source
community.
</p>
Expand Down Expand Up @@ -481,12 +481,12 @@ function Home() {
</div>
<div className="ml-4">
<h5 className="text-lg leading-6 font-medium">
Always sized and positionned correctly
Always sized and positioned correctly
</h5>
<p className="mt-2 text-base leading-6 text-description">
The modal experience leverages behavior of most
populars Integrated Developement Environements or
native experience on mobile. An opaque layer is
popular Integrated Developement Environements (IDEs)
or native experience on mobile. An opaque layer is
making sure we keep the context of the documentation
but remove all visual pollution.
</p>
Expand Down Expand Up @@ -730,10 +730,11 @@ function Home() {
Accessibility
</h4>
<p className="mt-2 text-base leading-6 text-description">
We are releasing this version with our best efforts in
regards to accessibility and we are willing to go
deeper. We'd like to work closely with expert of the
topic. Please contact us.
We have released this version with our best efforts on
addressing accessibility issues and we are willing to
make further changes. We'd like to work closely with an
expert in accessibility. Please contact us if you are
interested.
</p>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions packages/website/src/components/showcase-projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,5 +243,10 @@
"name": "Vite",
"image": "img/logos/vite.svg",
"href": "https://vitejs.dev/"
},
{
"name": "Markdoc",
"image": "img/logos/markdoc.svg",
"href": "https://markdoc.io/"
}
]
5 changes: 5 additions & 0 deletions packages/website/static/img/logos/markdoc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e1ad16d

Please sign in to comment.