Skip to content

Commit ae747f9

Browse files
authored
Merge pull request #932 from timlrx/feat/github-alerts
Add Github alerts feature
2 parents cd25e61 + f01a4a0 commit ae747f9

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Internationalization support - [Template with i18n](https://tailwind-nextjs-star
6262
- [Wujie's Blog: 旅行者计划](https://www.wujieli.com/) - Wujie's personal digital garden ([source code](https://github.com/wujieli0207/wujie-blog-next))
6363
- [Xiaodong's Blog](https://blog.linxiaodong.com) - Xiaodong's personal blog about front-end technology, and life. 「中文」([source code](https://github.com/buxuku/buxuku.github.io))
6464
- [Azurtelier.com](https://www.azurtelier.com/) - Amos's personal website for tech, music, AI illustrations, etc. [English/中文] ([Source code](https://github.com/AmosChenZixuan/Azurtelier.com))
65-
- [JoshHaines.com](https://www.JoshHaines.com/) - Personal website for Josh Haines. ([source code](https://github.com/jdhaines/joshhaines))
65+
- [JoshHaines.com](https://www.JoshHaines.com/) - Personal website for Josh Haines. ([source code](https://github.com/jdhaines/joshhaines))
6666

6767
Using the template? Feel free to create a PR and add your blog to this list.
6868

@@ -105,7 +105,7 @@ Thanks to the community of users and contributors to the template! We are no lon
105105
- [kaveh.page](https://kaveh.page) - Kaveh Tehrani's personal blog. Added tags directory, profile card, time-to-read on posts directory, etc.
106106
- [drakerossman.com](https://drakerossman.com/) - Drake Rossman's blog about NixOS, Rust, Software Architecture and Engineering Management, as well as general musings.
107107
- [meamenu.com](https://www.meamenu.com) - Landing page and product blog starting from this template. It also uses [framer-motion](https://www.framer.com/motion) for animations, custom layout templates, [waline](https://waline.js.org/en/) for blog comments and [primereact](https://primereact.org/) forms [Ita]
108-
108+
109109
## Motivation
110110

111111
I wanted to port my existing blog to Nextjs and Tailwind CSS but there was no easy out of the box template to use so I decided to create one. Design is adapted from [Tailwindlabs blog](https://github.com/tailwindlabs/blog.tailwindcss.com).
@@ -131,6 +131,7 @@ I wanted it to be nearly as feature-rich as popular blogging templates like [bea
131131
- Server-side syntax highlighting with line numbers and line highlighting via [rehype-prism-plus](https://github.com/timlrx/rehype-prism-plus)
132132
- Math display supported via [KaTeX](https://katex.org/)
133133
- Citation and bibliography support via [rehype-citation](https://github.com/timlrx/rehype-citation)
134+
- [Github alerts](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) via [remark-github-blockquote-alert](https://github.com/jaywcjlove/remark-github-blockquote-alert)
134135
- Automatic image optimization via [next/image](https://nextjs.org/docs/basic-features/image-optimization)
135136
- Support for tags - each unique tag will be its own page
136137
- Support for multiple authors

app/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'css/tailwind.css'
22
import 'pliny/search/algolia.css'
3+
import 'remark-github-blockquote-alert/alert.css'
34

45
import { Space_Grotesk } from 'next/font/google'
56
import { Analytics, AnalyticsConfig } from 'pliny/analytics'

contentlayer.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { fromHtmlIsomorphic } from 'hast-util-from-html-isomorphic'
77
// Remark packages
88
import remarkGfm from 'remark-gfm'
99
import remarkMath from 'remark-math'
10+
import { remarkAlert } from 'remark-github-blockquote-alert'
1011
import {
1112
remarkExtractFrontmatter,
1213
remarkCodeTitles,
@@ -153,6 +154,7 @@ export default makeSource({
153154
remarkCodeTitles,
154155
remarkMath,
155156
remarkImgToJsx,
157+
remarkAlert,
156158
],
157159
rehypePlugins: [
158160
rehypeSlug,

data/blog/introducing-tailwind-nextjs-starter-blog.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Introducing Tailwind Nextjs Starter Blog'
33
date: '2021-01-12'
4-
lastmod: '2021-02-01'
4+
lastmod: '2024-06-02'
55
tags: ['next-js', 'tailwind', 'guide']
66
draft: false
77
summary: 'Looking for a performant, out of the box template, with all the best in web technology to support your blogging needs? Checkout the Tailwind Nextjs Starter Blog template.'
@@ -15,6 +15,9 @@ authors: ['default', 'sparrowhawk']
1515

1616
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/timlrx/tailwind-nextjs-starter-blog)
1717

18+
> [!CAUTION]
19+
> This is the README of version 1 of the template. It is kept for historical reasons, but is no longer supported. It also serves as a nice example of [Github Alert](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts). For the actual documentation, please refer to the [Github repository](https://github.com/timlrx/tailwind-nextjs-starter-blog).
20+
1821
This is a [Next.js](https://nextjs.org/), [Tailwind CSS](https://tailwindcss.com/) blogging starter template. Probably the most feature-rich Next.js markdown blogging template out there. Comes out of the box configured with the latest technologies to make technical writing a breeze. Easily configurable and customizable. Perfect as a replacement to existing Jekyll and Hugo individual blogs.
1922

2023
Check out the documentation below to get started.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"rehype-slug": "^6.0.0",
4040
"remark": "^15.0.0",
4141
"remark-gfm": "^4.0.0",
42+
"remark-github-blockquote-alert": "^1.2.1",
4243
"remark-math": "^6.0.0",
4344
"tailwindcss": "^3.4.3",
4445
"unist-util-visit": "^5.0.0"

yarn.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10073,6 +10073,15 @@ __metadata:
1007310073
languageName: node
1007410074
linkType: hard
1007510075

10076+
"remark-github-blockquote-alert@npm:^1.2.1":
10077+
version: 1.2.1
10078+
resolution: "remark-github-blockquote-alert@npm:1.2.1"
10079+
dependencies:
10080+
unist-util-visit: ^5.0.0
10081+
checksum: 4205d4de6324710b3fbd316025247f99a551ce793cb049fe45c30319a73c90e2845ccf318f70744fb17fc9ff971980dc1b95264131303d1c5e3048e53c8b3753
10082+
languageName: node
10083+
linkType: hard
10084+
1007610085
"remark-math@npm:^6.0.0":
1007710086
version: 6.0.0
1007810087
resolution: "remark-math@npm:6.0.0"
@@ -10930,6 +10939,7 @@ __metadata:
1093010939
rehype-slug: ^6.0.0
1093110940
remark: ^15.0.0
1093210941
remark-gfm: ^4.0.0
10942+
remark-github-blockquote-alert: ^1.2.1
1093310943
remark-math: ^6.0.0
1093410944
tailwindcss: ^3.4.3
1093510945
typescript: ^5.1.3

0 commit comments

Comments
 (0)