Skip to content

Commit

Permalink
style: markdown styling using tailwind typography prose
Browse files Browse the repository at this point in the history
  • Loading branch information
asdofindia committed Nov 14, 2023
1 parent f616a5c commit c16bc4d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/layouts/BlogPostLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@ import Navbar from '../components/navbar.jsx';
<meta name="generator" content={Astro.generator} />
<title>{frontmatter.title}</title> <!-- You can include the title from frontmatter -->
</head>
<body>
<body class="dark:bg-slate-800">
<Navbar client:load />
<div class="m-2 p-2">
<h1 class="text-3xl font-bold">{frontmatter.title}</h1>
<p class="text-lg font-bold">{frontmatter.description}</p>
<h3 class="text-md font-semibold">Author: {frontmatter.author}</h3>
<hr class="border-black my-4" />
<div class="p-2 m-2"> <!-- Applies default styles for Markdown content -->
<!-- Markdown content is injected here -->
<slot>
</slot>
<div
class="m-2 p-2 prose lg:prose-xl dark:prose-invert
prose-h1:font-bold prose-h1:text-xl
prose-a:text-blue-600 prose-p:text-justify prose-img:rounded-xl"
>
<slot />
</div>
</div>
<Footer />
Expand Down
4 changes: 3 additions & 1 deletion tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ module.exports = {
theme: {
extend: {},
},
plugins: [],
plugins: [
require('@tailwindcss/typography'),
],
}

0 comments on commit c16bc4d

Please sign in to comment.