Skip to content

Commit

Permalink
docs: link(ify) the releases in the changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox committed Aug 25, 2024
1 parent f8574e5 commit 060d83f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
3 changes: 0 additions & 3 deletions docs_src/src/pages/_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ import 'focus-visible'
import { Router, useRouter } from 'next/router'

import { MDXProvider } from '@mdx-js/react'
import Link from 'next/link'

import { Layout } from '@/components/documentation/Layout'
import { Container } from '@/components/Container'
import { Layout as ReleaseLayout } from '@/components/releases/Layout'
import * as mdxComponents from '@/components/documentation/mdx'
import * as releaseMdxComponents from '@/components/releases/mdx'
import { useMobileNavigationStore } from '@/components/documentation/MobileNavigation'

import { Analytics } from '@vercel/analytics/react'
Expand Down
19 changes: 10 additions & 9 deletions docs_src/src/pages/releases/index.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
import axios from 'axios'
import { MDXProvider } from '@mdx-js/react'
import { useEffect, useState } from 'react'
import Markdown from 'react-markdown' // package for rendering markdown as React components
import { Layout as ReleaseLayout } from '@/components/releases/Layout'
import { serialize } from 'next-mdx-remote/serialize'
import { MDXRemote } from 'next-mdx-remote'

import {
a,
wrapper,
a as A,
H2,
img,
Article,
code,
p,
} from '@/components/releases/mdx'

import * as releaseMdxComponents from '@/components/releases/mdx'
Expand All @@ -28,9 +21,16 @@ const ChangelogPage = ({ releases }) => {
date={new Date(release.publishedAt)}
id={release.name}
>
<A
href={`https://github.com/sparckles/robyn/releases/tag/${release.tag}`}
target="_blank"
rel="noopener noreferrer"
className="hover:text-yellow-500 transition-colors"
>
<H2 key={release.id} className="text-lg font-extrabold text-white">
{release.name}
</H2>
</H2>
</A>
<MDXRemote
key={release.id}
{...release.body}
Expand All @@ -54,6 +54,7 @@ export async function getStaticProps() {
name: release.name,
body: await serialize(release.body),
publishedAt: release.published_at,
tag: release.tag_name,
}))
)

Expand Down

0 comments on commit 060d83f

Please sign in to comment.