Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Full history for the git-based last update dates.
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 22
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Full history for the git-based last update dates.
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 22
Expand Down
12 changes: 0 additions & 12 deletions blog/2019-05-28-first-blog-post.md

This file was deleted.

44 changes: 0 additions & 44 deletions blog/2019-05-29-long-blog-post.md

This file was deleted.

20 changes: 0 additions & 20 deletions blog/2021-08-01-mdx-blog-post.mdx

This file was deleted.

Binary file not shown.
25 changes: 0 additions & 25 deletions blog/2021-08-26-welcome/index.md

This file was deleted.

17 changes: 0 additions & 17 deletions blog/authors.yml

This file was deleted.

6 changes: 3 additions & 3 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import TabItem from '@theme/TabItem';
:::tip
Need turn-by-turn navigation? See [turn-by-turn navigation with @rnmapbox/navigation](navigation/overview.md), built on `@rnmapbox/maps`.
:::
# Configure credentials
## Configure credentials

Before installing @rnmapbox/maps you'll need to get your Mapbox access token.

Expand All @@ -22,7 +22,7 @@ On the top of your token list, copy your **Default Public Token**. The public to

For more details, see [Configure Credentials](https://docs.mapbox.com/ios/maps/guides/install/#part-1-create-and-configure-your-credentials) on mapbox.com.

# Install
## Install

<Tabs groupId="install-module" queryString defaultValue="npm" values={[
{label:'NPM', value:'npm'},
Expand Down Expand Up @@ -52,7 +52,7 @@ expo install @rnmapbox/maps
</TabItem>
</Tabs>

# Configure @rnmapbox/maps
## Configure @rnmapbox/maps

<Tabs groupId="configure-module" queryString defaultValue="ios" values={[
{label:'iOS', value:'ios'},
Expand Down
6 changes: 3 additions & 3 deletions docs/navigation/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Set up `@rnmapbox/maps` first, following its [install guide](../install.md). `@r

`@rnmapbox/navigation` is published under the `next` tag while it's in alpha.

# Install
## Install

<Tabs groupId="install-module" queryString defaultValue="npm" values={[
{label:'NPM', value:'npm'},
Expand All @@ -34,7 +34,7 @@ yarn add @rnmapbox/navigation@next @rnmapbox/maps
</TabItem>
</Tabs>

# Configure @rnmapbox/navigation
## Configure @rnmapbox/navigation

<Tabs groupId="configure-module" queryString defaultValue="ios" values={[
{label:'iOS', value:'ios'},
Expand Down Expand Up @@ -178,7 +178,7 @@ Rerun `prebuild` after changing plugin options.
</TabItem>
</Tabs>

# Access token
## Access token

Pass your public access token to both libraries before requesting routes. Navigation is billed to this token.

Expand Down
7 changes: 5 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const config = {
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
showLastUpdateTime: true,
editUrl: (url) => {
if (url.docPath.startsWith('examples/')) {
return `https://github.com/rnmapbox/maps/tree/main/example/src/examples/${url.docPath.replace('examples/', '').replace('.md', '.tsx')}`
Expand All @@ -78,12 +79,14 @@ const config = {
}
}
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
sitemap: {
// The blog and the markdown page are still the Docusaurus template content, and search is noindex.
ignorePatterns: ['/blog', '/blog/**', '/markdown-page', '/search'],
lastmod: 'date',
// Search and the tag pages are noindex.
ignorePatterns: ['/search', '/docs/tags', '/docs/tags/**'],
},
}),
],
Expand Down
7 changes: 0 additions & 7 deletions src/pages/markdown-page.md

This file was deleted.

37 changes: 37 additions & 0 deletions src/theme/DocItem/Metadata/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import Head from '@docusaurus/Head';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import {PageMetadata} from '@docusaurus/theme-common';
import {useDoc} from '@docusaurus/plugin-content-docs/client';
import Metadata from '@theme-original/DocItem/Metadata';

const NAVIGATION_PACKAGE = '@rnmapbox/navigation';

function NavigationMetadata() {
const {metadata, frontMatter, assets} = useDoc();
const {siteConfig} = useDocusaurusContext();
const title = metadata.title.includes(NAVIGATION_PACKAGE)
? metadata.title
: `${metadata.title} ${siteConfig.titleDelimiter} ${NAVIGATION_PACKAGE}`;
return (
<>
<PageMetadata
image={assets.image ?? frontMatter.image ?? '/img/navigation/social-card.jpg'}
/>
<Head>
<title>{title}</title>
<meta property="og:title" content={title} />
</Head>
</>
);
}

export default function MetadataWrapper(props) {
const {metadata} = useDoc();
return (
<>
<Metadata {...props} />
{metadata.permalink.startsWith('/docs/navigation/') && <NavigationMetadata />}
</>
);
}
14 changes: 14 additions & 0 deletions src/theme/DocTagDocListPage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Head from '@docusaurus/Head';
import Original from '@theme-original/DocTagDocListPage';

export default function DocTagDocListPageWrapper(props) {
return (
<>
<Head>
<meta name="robots" content="noindex, follow" />
</Head>
<Original {...props} />
</>
);
}
14 changes: 14 additions & 0 deletions src/theme/DocTagsListPage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Head from '@docusaurus/Head';
import Original from '@theme-original/DocTagsListPage';

export default function DocTagsListPageWrapper(props) {
return (
<>
<Head>
<meta name="robots" content="noindex, follow" />
</Head>
<Original {...props} />
</>
);
}
Loading