Skip to content

Commit

Permalink
add docs/ to tags, remove from basePath
Browse files Browse the repository at this point in the history
  • Loading branch information
dhazelett committed Feb 6, 2024
1 parent cf8868a commit 31dacbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const nextConfig = {
output: 'export',
images: { unoptimized: true },
pageExtensions: ['js', 'jsx', 'md', 'ts', 'tsx'],
basePath: '/armchair-docs/docs'
basePath: '/armchair-docs'
};

export default withSearch(
Expand Down
5 changes: 2 additions & 3 deletions src/markdoc/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { QuickLink, QuickLinks } from '@/components/QuickLinks';
import { Button } from '@/components/Button';

const tags = {

callout: {
attributes: {
title: { type: String },
Expand All @@ -27,7 +26,7 @@ const tags = {
render: ({ src, alt = '', caption }) => (
<figure>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={src} alt={alt} />
<img src={`docs/${src}`} alt={alt} />
<figcaption>{caption}</figcaption>
</figure>
),
Expand All @@ -40,7 +39,7 @@ const tags = {
},
render: ({ src }) => (
<video controls loop>
<source src={src} type={`video/${src.replace(/.*\.(.*)/g, '$1')}`} />
<source src={`docs/${src}`} type={`video/${src.replace(/.*\.(.*)/g, '$1')}`} />
</video>
),
},
Expand Down

0 comments on commit 31dacbf

Please sign in to comment.