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

docs: link(ify) the releases in the changelog #947

Merged
merged 1 commit into from
Aug 25, 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
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
Loading