Skip to content

Commit

Permalink
Adds a subtitle to use
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathakurxd committed Jun 6, 2024
1 parent e0ba7dc commit 7802607
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pages/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export interface PaginationType {
interface Props {
frontMatter: {
title: string;
subtitle: string;
nav: number;
};
nav: Record<string, Record<string, NavRoute>>;
Expand Down Expand Up @@ -133,6 +134,11 @@ const DocSlugs = ({ source, frontMatter, pagination, showToc = true }: Props) =>
paddingBottom: '80px'
}}>
<h1>{frontMatter.title}</h1>
{frontMatter.subtitle ? (
<h3 className="subtitle">{frontMatter.subtitle}</h3>
) : (
<></>
)}
<MDXProvider components={components}>
<Component />
</MDXProvider>
Expand Down
7 changes: 7 additions & 0 deletions styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,13 @@ code:not(.ch-code-scroll-parent) {
font-weight: 600;
}

.subtitle {
color: #a0a0a0;
font-weight: 400;
font-size: 1.25em;
margin-top: 5px;
}

pre code:not(.ch-code-scroll-parent) {
border: none;
border-radius: 0;
Expand Down

0 comments on commit 7802607

Please sign in to comment.