Skip to content

Commit d52723f

Browse files
committed
Fix lint errors in print page
1 parent ed61da2 commit d52723f

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

Binary file not shown.

src/pages/print/[...slug].astro

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
22
export const prerender = true
33
4+
import { GENERATE_PDFS } from 'astro:env/server'
45
import { type CollectionEntry, getCollection, getEntry, render } from 'astro:content'
56
import type { MarkdownHeading } from 'astro'
67
import { Image, Picture } from 'astro:assets'
78
import { isDev } from '@lib/config/environmentServer'
8-
import PrintLayout from '@layouts/PrintLayout.astro'
9-
import Cover from '@components/Layout/Print/Cover/index.astro'
10-
import PrintToc from '@components/Layout/Print/Toc/index.astro'
9+
1110
import Copyright from '@components/Layout/Copyright/index.astro'
11+
import Cover from '@components/Layout/Print/Cover/index.astro'
12+
import PrintLayout from '@layouts/PrintLayout.astro'
1213
import QrCode from '@components/QrCode/index.astro'
14+
import Toc from '@components/Layout/Print/Toc/index.astro'
1315
1416
/** MDX components that are safe for static PDF rendering (no web components) */
1517
import Avatar from '@components/Avatar/index.astro'
1618
import Button from '@components/Button/index.astro'
1719
import Callout from '@components/Callout/index.astro'
20+
import CodeTabs from '@components/Code/CodeTabs/index.astro'
1821
import Copy from '@components/Copy/index.astro'
1922
import Diagram from '@components/Diagram/index.astro'
2023
import Icon from '@components/Icon/index.astro'
@@ -23,7 +26,6 @@ import List from '@components/List/index.astro'
2326
import ListItem from '@components/List/ListItem.astro'
2427
import Table from '@components/Table/index.astro'
2528
import Time from '@components/Time/index.astro'
26-
import CodeTabs from '@components/Code/CodeTabs/index.astro'
2729
2830
const PdfComponents = {
2931
Avatar,
@@ -48,7 +50,7 @@ export interface Props {
4850
4951
/** Generate static paths for all deep-dive articles */
5052
export async function getStaticPaths() {
51-
if (!isDev() && !import.meta.env.GENERATE_PDFS) {
53+
if (!isDev() && !GENERATE_PDFS) {
5254
return []
5355
}
5456
@@ -75,7 +77,7 @@ const publishDate = article.data.publishDate
7577
<Cover article={article} authorName={author.data.name} />
7678

7779
{/* Table of contents — page numbers injected by the PDF generation script */}
78-
<PrintToc headings={tocHeadings} />
80+
<Toc headings={tocHeadings} />
7981

8082
{/* Article body */}
8183
<article class="print-article markdown-content__prose">

0 commit comments

Comments
 (0)