这是indexloc提供的服务,不要输入任何密码
Skip to content

Upgrade docs with better search #599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 26, 2022
Merged

Upgrade docs with better search #599

merged 11 commits into from
Jan 26, 2022

Conversation

shuding
Copy link
Member

@shuding shuding commented Jan 24, 2022

Fix #304

Upgrades Nextra which has better built-in search. This also removes Prism since the new Nextra includes Shiki to generate highlighting at build time. A notable change is highlight="1,2-3" is now {1,2-3} (docs).

Also have to disable React strict mode. We're on React 17 so it's tricky to support the hash slugger without the new React 18 APIs.

@shuding shuding requested a review from jaredpalmer as a code owner January 24, 2022 16:32
@vercel
Copy link

vercel bot commented Jan 24, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/turbo-site/4SZruRptMD8PKrCSftSKRkmsVjSy
✅ Preview: https://turbo-site-git-fork-shuding-shu-ed95.vercel.sh

@shuding shuding marked this pull request as draft January 24, 2022 16:47
@shuding shuding marked this pull request as ready for review January 24, 2022 16:57
@shuding
Copy link
Member Author

shuding commented Jan 24, 2022

(Later we can introduce a noindex option to skip pages like /terms.)

@jaredpalmer
Copy link
Contributor

How hard is it to do noindex? it's really invading most results

@shuding
Copy link
Member Author

shuding commented Jan 24, 2022

Actually not hard, will add it today!

@jaredpalmer
Copy link
Contributor

I think we'll wait until that to merge

@jaredpalmer jaredpalmer added the pr: on hold Pull requests that are "on hold" and should not be merged label Jan 24, 2022
@shuding
Copy link
Member Author

shuding commented Jan 24, 2022

Named it as searchable since noindex is commonly used for another purpose.

@jaredpalmer
Copy link
Contributor

CleanShot 2022-01-24 at 16 35 02@2x
CleanShot 2022-01-24 at 16 35 08@2x
Loading spinner and error on the preview at the moment

@jaredpalmer
Copy link
Contributor

@shuding might be broken because turbo docs site is using FS API and .nextra isn't part of the upload.

@jaredpalmer jaredpalmer removed the pr: on hold Pull requests that are "on hold" and should not be merged label Jan 25, 2022
@jaredpalmer
Copy link
Contributor

Let's see if removing FS api solves it? https://github.com/vercel/turborepo/blob/main/docs/vercel.json#L4

@shuding
Copy link
Member Author

shuding commented Jan 25, 2022

Gotcha, or maybe moving that folder to .output (via a script)? Let me try removing it first.

@vercel
Copy link

vercel bot commented Jan 25, 2022

@shuding is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@jaredpalmer jaredpalmer merged commit 63c2c1c into vercel:main Jan 26, 2022
@shuding shuding deleted the shu/ed95 branch January 26, 2022 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use algolia docs search on docs site
2 participants