mirror of
https://github.com/explosion/spaCy.git
synced 2025-05-02 14:53:41 +03:00
💫 v2.1.0 launch updates (only merge on launch!) (#3414)
* Update README.md * Use production docsearch [ci skip] * Add option to exclude pages from search
This commit is contained in:
parent
f0c1efcb00
commit
08284f3a11
22
README.md
22
README.md
|
@ -12,7 +12,7 @@ currently supports tokenization for **45+ languages**. It features the
|
||||||
and easy **deep learning** integration. It's commercial open-source software,
|
and easy **deep learning** integration. It's commercial open-source software,
|
||||||
released under the MIT license.
|
released under the MIT license.
|
||||||
|
|
||||||
💫 **Version 2.0 out now!** [Check out the release notes here.](https://github.com/explosion/spaCy/releases)
|
💫 **Version 2.1 out now!** [Check out the release notes here.](https://github.com/explosion/spaCy/releases)
|
||||||
|
|
||||||
[](https://dev.azure.com/explosion-ai/public/_build?definitionId=8)
|
[](https://dev.azure.com/explosion-ai/public/_build?definitionId=8)
|
||||||
[](https://travis-ci.org/explosion/spaCy)
|
[](https://travis-ci.org/explosion/spaCy)
|
||||||
|
@ -25,17 +25,19 @@ released under the MIT license.
|
||||||
|
|
||||||
## 📖 Documentation
|
## 📖 Documentation
|
||||||
|
|
||||||
| Documentation | |
|
| Documentation | |
|
||||||
| --------------- | ----------------------------------------------------- |
|
| --------------- | -------------------------------------------------------------- |
|
||||||
| [spaCy 101] | New to spaCy? Here's everything you need to know! |
|
| [spaCy 101] | New to spaCy? Here's everything you need to know! |
|
||||||
| [Usage Guides] | How to use spaCy and its features. |
|
| [Usage Guides] | How to use spaCy and its features. |
|
||||||
| [API Reference] | The detailed reference for spaCy's API. |
|
| [New in v2.1] | New features, backwards incompatibilities and migration guide. |
|
||||||
| [Models] | Download statistical language models for spaCy. |
|
| [API Reference] | The detailed reference for spaCy's API. |
|
||||||
| [Universe] | Libraries, extensions, demos, books and courses. |
|
| [Models] | Download statistical language models for spaCy. |
|
||||||
| [Changelog] | Changes and version history. |
|
| [Universe] | Libraries, extensions, demos, books and courses. |
|
||||||
| [Contribute] | How to contribute to the spaCy project and code base. |
|
| [Changelog] | Changes and version history. |
|
||||||
|
| [Contribute] | How to contribute to the spaCy project and code base. |
|
||||||
|
|
||||||
[spacy 101]: https://spacy.io/usage/spacy-101
|
[spacy 101]: https://spacy.io/usage/spacy-101
|
||||||
|
[new in v2.1]: https://spacy.io/usage/v2-1
|
||||||
[usage guides]: https://spacy.io/usage/
|
[usage guides]: https://spacy.io/usage/
|
||||||
[api reference]: https://spacy.io/api/
|
[api reference]: https://spacy.io/api/
|
||||||
[models]: https://spacy.io/models
|
[models]: https://spacy.io/models
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Styleguide
|
title: Styleguide
|
||||||
section: styleguide
|
section: styleguide
|
||||||
|
search_exclude: true
|
||||||
menu:
|
menu:
|
||||||
- ['Logo', 'logo']
|
- ['Logo', 'logo']
|
||||||
- ['Colors', 'colors']
|
- ['Colors', 'colors']
|
||||||
|
|
|
@ -71,6 +71,7 @@ exports.createPages = ({ graphql, actions }) => {
|
||||||
tag
|
tag
|
||||||
new
|
new
|
||||||
next
|
next
|
||||||
|
search_exclude
|
||||||
menu
|
menu
|
||||||
sidebar {
|
sidebar {
|
||||||
label
|
label
|
||||||
|
@ -133,6 +134,7 @@ exports.createPages = ({ graphql, actions }) => {
|
||||||
tag: frontmatter.tag,
|
tag: frontmatter.tag,
|
||||||
version: frontmatter.new,
|
version: frontmatter.new,
|
||||||
theme: sectionMeta.theme,
|
theme: sectionMeta.theme,
|
||||||
|
searchExclude: frontmatter.search_exclude,
|
||||||
relativePath: page.node.relativePath,
|
relativePath: page.node.relativePath,
|
||||||
next: next
|
next: next
|
||||||
? {
|
? {
|
||||||
|
|
|
@ -23,11 +23,6 @@
|
||||||
"list": "89ad33e698"
|
"list": "89ad33e698"
|
||||||
},
|
},
|
||||||
"docSearch": {
|
"docSearch": {
|
||||||
"apiKey": "f7dbcd148fae73db20b6ad33d03cc9e8",
|
|
||||||
"indexName": "dev_spacy_netlify",
|
|
||||||
"appId": "Y7BGGRAPHC"
|
|
||||||
},
|
|
||||||
"_docSearch": {
|
|
||||||
"apiKey": "371e26ed49d29a27bd36273dfdaf89af",
|
"apiKey": "371e26ed49d29a27bd36273dfdaf89af",
|
||||||
"indexName": "spacy"
|
"indexName": "spacy"
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,13 +6,12 @@ import Icon from './icon'
|
||||||
import classes from '../styles/search.module.sass'
|
import classes from '../styles/search.module.sass'
|
||||||
|
|
||||||
const Search = ({ id, placeholder, settings }) => {
|
const Search = ({ id, placeholder, settings }) => {
|
||||||
const { apiKey, indexName, appId } = settings
|
const { apiKey, indexName } = settings
|
||||||
const [initialized, setInitialized] = useState(false)
|
const [initialized, setInitialized] = useState(false)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
setInitialized(true)
|
setInitialized(true)
|
||||||
window.docsearch({
|
window.docsearch({
|
||||||
appId,
|
|
||||||
apiKey,
|
apiKey,
|
||||||
indexName,
|
indexName,
|
||||||
inputSelector: `#${id}`,
|
inputSelector: `#${id}`,
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { graphql } from 'gatsby'
|
||||||
import { MDXProvider } from '@mdx-js/tag'
|
import { MDXProvider } from '@mdx-js/tag'
|
||||||
import { withMDXScope } from 'gatsby-mdx/context'
|
import { withMDXScope } from 'gatsby-mdx/context'
|
||||||
import useOnlineStatus from '@rehooks/online-status'
|
import useOnlineStatus from '@rehooks/online-status'
|
||||||
|
import classNames from 'classnames'
|
||||||
|
|
||||||
import MDXRenderer from './mdx-renderer'
|
import MDXRenderer from './mdx-renderer'
|
||||||
|
|
||||||
|
@ -108,6 +109,7 @@ class Layout extends React.Component {
|
||||||
source: PropTypes.string,
|
source: PropTypes.string,
|
||||||
isIndex: PropTypes.bool.isRequired,
|
isIndex: PropTypes.bool.isRequired,
|
||||||
theme: PropTypes.string,
|
theme: PropTypes.string,
|
||||||
|
searchExclude: PropTypes.bool,
|
||||||
next: PropTypes.shape({
|
next: PropTypes.shape({
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
slug: PropTypes.string.isRequired,
|
slug: PropTypes.string.isRequired,
|
||||||
|
@ -128,8 +130,8 @@ class Layout extends React.Component {
|
||||||
const { data, pageContext, location, children } = this.props
|
const { data, pageContext, location, children } = this.props
|
||||||
const { file, site = {} } = data || {}
|
const { file, site = {} } = data || {}
|
||||||
const mdx = file ? file.childMdx : null
|
const mdx = file ? file.childMdx : null
|
||||||
const { title, section, sectionTitle, teaser, theme = 'blue' } = pageContext
|
const { title, section, sectionTitle, teaser, theme = 'blue', searchExclude } = pageContext
|
||||||
const bodyClass = `theme-${theme}`
|
const bodyClass = classNames(`theme-${theme}`, { 'search-exclude': !!searchExclude })
|
||||||
const meta = site.siteMetadata || {}
|
const meta = site.siteMetadata || {}
|
||||||
const isDocs = ['usage', 'models', 'api', 'styleguide'].includes(section)
|
const isDocs = ['usage', 'models', 'api', 'styleguide'].includes(section)
|
||||||
const content = !mdx ? null : (
|
const content = !mdx ? null : (
|
||||||
|
@ -191,7 +193,6 @@ export const pageQuery = graphql`
|
||||||
docSearch {
|
docSearch {
|
||||||
apiKey
|
apiKey
|
||||||
indexName
|
indexName
|
||||||
appId
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user