move global recommendation
This commit is contained in:
parent
aaa74a88ae
commit
c3fd6c04be
2 changed files with 7 additions and 5 deletions
|
|
@ -326,6 +326,8 @@ the whole page, and will be the same for all records extracted from this page.
|
|||
}
|
||||
```
|
||||
|
||||
We do not recommend `text` selectors to be global.
|
||||
|
||||
### Setting a default value
|
||||
|
||||
If your selector might not match a valid element on the page, you can define a
|
||||
|
|
|
|||
|
|
@ -63,17 +63,17 @@ role. These classes can not involve any style changes. These dedicated classes
|
|||
will help us to create a great learn as you type experience from your
|
||||
documentation.
|
||||
|
||||
- Add a static `DocSearch-content` class to the main container of your textual
|
||||
content. It is mostly a main or article HTML element.
|
||||
- Add a static class `DocSearch-content` to the main container of your textual
|
||||
content. It is mostly a `<main/>` or an `<article/>` HTML element.
|
||||
|
||||
- Every searchable `lvl` elements outside this main documentation container (for
|
||||
instance in a sidebar) must be `global` selectors. They will be globally
|
||||
pickup and injected to every records built from your page. Be careful, the
|
||||
level's value matter and every matching element must have an increasing level
|
||||
along the HTML flow. The level `X` (for `lvlX`) should appear after a level
|
||||
`Y` while `X>Y`. We do not recommend `text` element to be global.
|
||||
`Y` while `X>Y`.
|
||||
|
||||
- `lvlX` selectors should use the standard title tags like `h1`, `h2`, `h3` ...
|
||||
- `lvlX` selectors should use the standard title tags like `h1`, `h2`, `h3`, ...
|
||||
You can add a class to these elements. Do not forget to set a unique `id` or
|
||||
`name` attribute to these elements as explain below.
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ documentation.
|
|||
to never nest one of these tags into another one, it will create duplicates.
|
||||
|
||||
- Stay consistent and do not forget that we need to have some regularity along
|
||||
the HTML flow [as presented here][2].
|
||||
the HTML flow [as presented here][1].
|
||||
|
||||
## Introduces global information as meta tags
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue