mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-03 13:14:11 +03:00
Merge branch 'spacy.io' into develop
This commit is contained in:
commit
dc933110d4
|
@ -23,6 +23,11 @@
|
|||
"list": "89ad33e698"
|
||||
},
|
||||
"docSearch": {
|
||||
"apiKey": "f7dbcd148fae73db20b6ad33d03cc9e8",
|
||||
"indexName": "dev_spacy_netlify",
|
||||
"appId": "Y7BGGRAPHC"
|
||||
},
|
||||
"_docSearch": {
|
||||
"apiKey": "371e26ed49d29a27bd36273dfdaf89af",
|
||||
"indexName": "spacy"
|
||||
},
|
||||
|
|
|
@ -6,12 +6,13 @@ import Icon from './icon'
|
|||
import classes from '../styles/search.module.sass'
|
||||
|
||||
const Search = ({ id, placeholder, settings }) => {
|
||||
const { apiKey, indexName } = settings
|
||||
const { apiKey, indexName, appId } = settings
|
||||
const [initialized, setInitialized] = useState(false)
|
||||
useEffect(() => {
|
||||
if (!initialized) {
|
||||
setInitialized(true)
|
||||
window.docsearch({
|
||||
appId,
|
||||
apiKey,
|
||||
indexName,
|
||||
inputSelector: `#${id}`,
|
||||
|
|
|
@ -8,7 +8,7 @@ import { H1 } from './typography'
|
|||
|
||||
import classes from '../styles/title.module.sass'
|
||||
|
||||
const Title = ({ title, tag, version, teaser, source, image, children, ...props }) => (
|
||||
const Title = ({ id, title, tag, version, teaser, source, image, children, ...props }) => (
|
||||
<header className={classes.root}>
|
||||
{(image || source) && (
|
||||
<div className={classes.corner}>
|
||||
|
@ -25,7 +25,7 @@ const Title = ({ title, tag, version, teaser, source, image, children, ...props
|
|||
)}
|
||||
</div>
|
||||
)}
|
||||
<H1 className={classes.h1} {...props}>
|
||||
<H1 className={classes.h1} id={id} {...props}>
|
||||
{title}
|
||||
</H1>
|
||||
{tag && <Tag spaced>{tag}</Tag>}
|
||||
|
|
|
@ -17,7 +17,7 @@ export default function HTML(props) {
|
|||
/>
|
||||
{props.headComponents}
|
||||
</head>
|
||||
<body id="top" {...props.bodyAttributes}>
|
||||
<body id="_top" {...props.bodyAttributes}>
|
||||
{props.preBodyComponents}
|
||||
<noscript key="noscript" id="gatsby-noscript">
|
||||
This app works best with JavaScript enabled.
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
margin-bottom: 0.5em
|
||||
vertical-align: middle
|
||||
|
||||
&[id]:target
|
||||
padding-top: 0 !important
|
||||
|
||||
.teaser
|
||||
font: normal var(--font-size-sm)/var(--line-height-md) var(--font-primary)
|
||||
color: var(--color-dark)
|
||||
|
|
|
@ -90,6 +90,7 @@ const Docs = ({ pageContext, children }) => (
|
|||
source={sourcePath}
|
||||
tag={tag}
|
||||
version={version}
|
||||
id="_title"
|
||||
/>
|
||||
{children}
|
||||
{subFooter}
|
||||
|
|
|
@ -191,6 +191,7 @@ export const pageQuery = graphql`
|
|||
docSearch {
|
||||
apiKey
|
||||
indexName
|
||||
appId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user