Skip to content

Commit

Permalink
Website fixes (#5668)
Browse files Browse the repository at this point in the history
**What's the problem this PR addresses?**
<!-- Describe the rationale of your PR. -->
<!-- Link all issues that it closes. (Closes/Resolves #xxxx.) -->

...

**How did you fix it?**
<!-- A detailed description of your implementation. -->

...

**Checklist**
<!--- Don't worry if you miss something, chores are automatically
tested. -->
<!--- This checklist exists to help you remember doing the chores when
you submit a PR. -->
<!--- Put an `x` in all the boxes that apply. -->
- [ ] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).

<!-- See
https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released
for more details. -->
<!-- Check with `yarn version check` and fix with `yarn version check
-i` -->
- [ ] I have set the packages that need to be released for my changes to
be effective.

<!-- The "Testing chores" workflow validates that your PR follows our
guidelines. -->
<!-- If it doesn't pass, click on it to see details as to what your PR
might be missing. -->
- [ ] I will check that all automated PR checks pass before the PR gets
reviewed.
  • Loading branch information
arcanis authored Aug 18, 2023
1 parent 27a673d commit 0f210d9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
5 changes: 3 additions & 2 deletions packages/docusaurus/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ const config = {
respectPrefersColorScheme: false,
},
algolia: {
appId: `BH4D9OD16A`,
apiKey: `029f65f2c00301615fd14958b67d6730`,
appId: `STXW7VT1S5`,
apiKey: `ecdfaea128fd901572b14543a2116eee`,
indexName: `yarnpkg_next`,
searchPagePath: `docs/search`,
contextualSearch: false,
},
navbar: {
title: `Yarn`,
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/lib/packageChecks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const checks: Array<Check> = [{
});

for (const name of [`preinstall`, `install`, `postinstall`])
if (releaseInfo.npm.scripts[name])
if (releaseInfo.npm.scripts?.[name])
return {ok: false};

return {ok: true};
Expand Down
12 changes: 10 additions & 2 deletions packages/docusaurus/src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,16 @@
}
}

.hero h1 {
font-size: 4rem;
@media (min-width: 300px) {
.hero {
--ifm-h1-font-size: 3rem;
}
}

@media (min-width: 380px) {
.hero {
--ifm-h1-font-size: 4rem;
}
}

.hero p {
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/pages/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const defaultRequests = [
}));

function useHitsWithDefaults(query: string): Array<any> {
const {hits} = useHits();
const {hits} = useHits({escapeHTML: false});
const [defaults, setDefaults] = useState<Array<any> | null>(null);

useEffect(() => {
Expand Down
3 changes: 3 additions & 0 deletions packages/docusaurus/static/_redirects
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/install.sh https://classic.yarnpkg.com/install.sh 301
/ q=:q /search?q=:q 301!

/playground/* code=:value https://viko0.sse.codesandbox.io/:splat?code=:value 301
/playground/* https://viko0.sse.codesandbox.io/:splat 301

Expand Down

0 comments on commit 0f210d9

Please sign in to comment.