statically compile documents
This commit is contained in:
parent
207d23b94c
commit
3f64142e4d
3 changed files with 5 additions and 9 deletions
|
@ -13,9 +13,8 @@ export default function News() {
|
||||||
<br className='my-4' />
|
<br className='my-4' />
|
||||||
<ul className='text-slate-50 px-6 list-disc'>
|
<ul className='text-slate-50 px-6 list-disc'>
|
||||||
<li key={1}>
|
<li key={1}>
|
||||||
eeXiv 2.0 has been released! The site should feel significantly more
|
eeXiv 2.1 has been released! Documents are now statically generated
|
||||||
responsive. Data caching has also been implemented so search results
|
for instant loading speeds.{' '}
|
||||||
and documents will load instantly the second time.
|
|
||||||
</li>
|
</li>
|
||||||
<li key={2}>Mobile support is currently in beta.</li>
|
<li key={2}>Mobile support is currently in beta.</li>
|
||||||
<li key={3}>
|
<li key={3}>
|
||||||
|
|
|
@ -10,11 +10,13 @@ import {
|
||||||
} from '@/app/components/DataDisplay'
|
} from '@/app/components/DataDisplay'
|
||||||
import { ItemBadge, Status } from '@/app/components/Badges'
|
import { ItemBadge, Status } from '@/app/components/Badges'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
import { notFound } from 'next/navigation'
|
||||||
|
|
||||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||||
|
|
||||||
export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) {
|
export default function DocumentViewer({ slug }: Readonly<{ slug: string }>) {
|
||||||
const { manifest, abstract, file, citation } = documents[slug]
|
const { manifest, abstract, file, citation } = documents[slug]
|
||||||
|
if (!manifest) return notFound()
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
authors,
|
authors,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import DocumentViewer from './DocumentViewer'
|
import DocumentViewer from './DocumentViewer'
|
||||||
import ErrorBoundary from '@/app/utils/ErrorBoundary'
|
|
||||||
import { documents } from '@/app/db/data'
|
import { documents } from '@/app/db/data'
|
||||||
|
|
||||||
export function generateStaticParams() {
|
export function generateStaticParams() {
|
||||||
|
@ -10,9 +9,5 @@ export function generateStaticParams() {
|
||||||
export default function Page({
|
export default function Page({
|
||||||
params,
|
params,
|
||||||
}: Readonly<{ params: { slug: string } }>) {
|
}: Readonly<{ params: { slug: string } }>) {
|
||||||
return (
|
return <DocumentViewer slug={params.slug} />
|
||||||
<ErrorBoundary>
|
|
||||||
<DocumentViewer slug={params.slug} />
|
|
||||||
</ErrorBoundary>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue