Skip to content
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

fix: update metadata tags in head #71

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"eslint-config-next": "14.0.1",
"postcss": "^8",
"remark-cli": "^12.0.0",
"remark-frontmatter": "^5.0.0",
"remark-lint-fenced-code-flag": "^3.1.2",
"remark-lint-first-heading-level": "^3.1.2",
"remark-lint-heading-increment": "^3.1.2",
Expand All @@ -46,6 +47,7 @@
"rule": "-"
},
"plugins": [
"remark-frontmatter",
"remark-preset-lint-consistent",
"remark-preset-lint-recommended",
"remark-lint-fenced-code-flag",
Expand Down
48 changes: 47 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/pages/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: docs
---
Comment on lines +1 to +3
Copy link
Contributor Author

@olizilla olizilla Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well heck. linter is unhappy with this

2:1-3:4 warning First heading level should be 1 first-heading-level remark-lint


import { Cards, Card } from 'nextra/components'

**Under the hood** web3.storage uses [UCANs](https://github.com/ucan-wg/spec) for trustless, local-first authorization, and is backed by the provable storage of [IPFS](https://docs.ipfs.tech/) and [Filecoin](https://docs.filecoin.io/basics/what-is-filecoin).
Expand Down
81 changes: 65 additions & 16 deletions src/theme.config.jsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,77 @@
import { useConfig } from 'nextra-theme-docs'
import { DocsLogo } from './components/brand'

const config = {
/**
* @type {import('nextra-theme-docs').DocsThemeConfig}
*/
export default {
logo: <DocsLogo>web3.storage/<span className='font-bold'>docs</span></DocsLogo>,
primaryHue: {
dark: 192,
light: 200
},
primarySaturation: 100,
project: {
link: 'https://github.com/web3-storage/w3up'
},
docsRepositoryBase: 'https://github.com/web3-storage/www/tree/main',
footer: {
component: <footer className='py-6 text-center text-lg'></footer>
},
head: <></>,
useNextSeoProps() {
const { frontMatter } = useConfig()
return {
titleTemplate: '%s ⁂ web3.storage'
titleTemplate: '%s ⁂ web3.storage',
description: frontMatter.description || 'Learn how to use web3.storage to decentralize your data storage',
additionalMetaTags: [
{ content: 'en', httpEquiv: 'Content-Language' },
{ name: 'apple-mobile-web-app-title', content: 'web3.storage/docs' },
{ name: 'msapplication-TileColor', content: '#fff' },
{ name: 'msapplication-TileImage', content: '/app-icon.svg' }
],
openGraph: {
// set when we have a nice preview image. No image more chill tho, so dont rush./
// images: [
// { url: frontMatter.image || 'https://web3.storage/social-card-web3storage.jpg' }
// ]
},
twitter: {
cardType: 'summary',
site: '@web3_storage'
},
additionalLinkTags: [
{
href: '/apple-touch-icon.png',
rel: 'apple-touch-icon',
sizes: '180x180'
},
{
href: '/android-chrome-192x192.png',
rel: 'icon',
sizes: '192x192',
type: 'image/png'
},
{
href: '/android-chrome-512x512.png',
rel: 'icon',
sizes: '512x512',
type: 'image/png'
},
{
href: '/favicon-32x32.png',
rel: 'icon',
sizes: '32x32',
type: 'image/png'
},
{
href: '/favicon-16x16.png',
rel: 'icon',
sizes: '16x16',
type: 'image/png'
}
],
}
},
footer: {
component: (
<footer className='py-6 text-center text-lg'>

</footer>
)
},
primaryHue: {
dark: 192,
light: 200
},
primarySaturation: 100,
}
}

export default config
Loading