diff --git a/README.md b/README.md index c4e4f66..e238684 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,13 @@ ![tailwind-nextjs-banner](/public/static/images/twitter-card.png) -# Ivan Li's Blog +# Tailwind Nextjs Starter Blog -[![Build Status](https://ci.ivanli.cc/api/badges/Ivan/tailwind-nextjs-blog/status.svg)](https://ci.ivanli.cc/Ivan/tailwind-nextjs-blog) +[![GitHub Repo stars](https://img.shields.io/github/stars/timlrx/tailwind-nextjs-starter-blog?style=social)](https://GitHub.com/timlrx/tailwind-nextjs-starter-blog/stargazers/) +[![GitHub forks](https://img.shields.io/github/forks/timlrx/tailwind-nextjs-starter-blog?style=social)](https://GitHub.com/timlrx/tailwind-nextjs-starter-blog/network/) +[![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Ftimlrxx)](https://twitter.com/timlrxx) +[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&link=https://github.com/sponsors/timlrx)](https://github.com/sponsors/timlrx) + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/timlrx/tailwind-nextjs-starter-blog) 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. @@ -26,32 +31,13 @@ Feature request? Check the past discussions to see if it has been brought up pre - [irvin.dev](https://www.irvin.dev/) - Irvin Lin's personal site. Added YouTube embedding. - [the all JavaScript Blog](https://the-all-javascript-blog.vercel.app/) - a JavaScript enlightenment blog uses this - [KirillSo.com](https://www.kirillso.com/) - Personal blog & website. -- [ghali.dev](https://ghali.dev) - Cyril's Blog - [DevBoy Blog](https://devboy.vercel.app/) - M.Reza's personal blog - [slightlysharpe.com](https://slightlysharpe.com) - [Tincre's](https://tincre.com) main company blog - [blog.b00st.com](https://blog.b00st.com) - [b00st.com's](https://b00st.com) main music promotion blog - [astrosaurus.me](https://astrosaurus.me/) - Ephraim Atta-Duncan's Personal Blog - [dhanrajsp.me](https://dhanrajsp.me/) - Dhanraj's personal site and blog. - [blog.r00ks.io](https://blog.r00ks.io/) - Austin Rooks's personal blog ([source code](https://github.com/Austionian/blog.r00ks)). -- [honghong.me](https://honghong.me) - Tszhong's personal website ([source code](https://github.com/tszhong0411/home)) - [alfoncode.com](https://alfoncode.com) - Alfonso García's personar website. Customized design ([source code](https://github.com/alfoncode/personal-web)) -- [marceloformentao.dev](https://marceloformentao.dev) - Marcelo Formentão personal website ([source code](https://github.com/marceloavf/marceloformentao.dev)). -- [abiraja.com](https://www.abiraja.com/) - with a [runnable JS code snippet component!](https://www.abiraja.com/blog/querying-solana-blockchain) -- [einargudni.com](https://www.einargudni.com) - with a customized theme, command pallette and more ([source code](https://github.com/einargudnig/einargudni.com)) -- [bpiggin.com](https://www.bpiggin.com) - Ben Piggin's personal blog -- [maqib.cn](https://maqib.cn) - A blog of Chinese front-end developers 狂奔小马的博客 ([源码](https://github.com/maqi1520/nextjs-tailwind-blog)) -- [ambilena.com](https://ambilena.com/) - Electronic Music Blog & imprint for upcoming musicians. -- [kittan.ru](https://www.kittan.ru/) - Kittanb's personal blog about linux ([source code](https://github.com/kittanb/blog)) -- [nchristopher.me](https://nchristopher.me) - Nicholas Christopher's personal website and blog ([source code](https://github.com/nchristopher/blog)) -- [dalelarroder.com](https://dalelarroder.com) - Dale Larroder's personal website and blog ([source code](https://github.com/dlarroder/dalelarroder)) -- [devahoy.com](https://devahoy.com) - Chai's personal blog (Thai language) -- [0xchai.io](https://0xchai.io) - Chai's personal blog -- [techipedia](https://techipedia.vercel.app) - Simple blogging progressive web app with custom installation button and top progress bar -- [reubence.com](https://reubence.com) - Reuben Rapose's Digital Garden -- [axolo.co/blog](https://axolo.co/blog) - Engineering management news & axolo.co updates (with image preview for article in the home page) -- [musing.vercel.app](https://musing.vercel.app/) - Parth Desai's personal blog ([source code](https://github.com/pycoder2000/blog)) -- [onyourmental.com](https://www.onyourmental.com/) - [Curtis Warcup's](https://github.com/Cwarcup) website for the On Your Mental Podcast ([source code](https://github.com/Cwarcup/on-your-mental)) -- [cwarcup.com](https://www.cwarcup.com/) - Curtis Warcup's personal website and blog ([source code](https://github.com/Cwarcup/personal-blog). Using the template? Feel free to create a PR and add your blog to this list. @@ -81,7 +67,7 @@ I wanted it to be nearly as feature-rich as popular blogging templates like [bea - Blog templates - TOC component - Support for nested routing of blog posts -- Newsletter component with support for mailchimp, buttondown, convertkit, klaviyo, revue, and emailoctopus +- Newsletter component with support for mailchimp, buttondown, convertkit and klaviyo - Supports [giscus](https://github.com/laymonage/giscus), [utterances](https://github.com/utterance/utterances) or disqus - Projects page - Preconfigured security headers @@ -98,27 +84,18 @@ I wanted it to be nearly as feature-rich as popular blogging templates like [bea ## Quick Start Guide -1. Try installing the starter using the new [Pliny project CLI](https://github.com/timlrx/pliny): - -```bash -npm i -g @pliny/cli -pliny new --template=starter-blog my-blog -``` - -It supports the updated version of the blog with Contentlayer, optional choice of TS/JS and different package managers as well as more modularized components which will be the basis of the template going forward. - -Alternatively to stick with the current version, TypeScript and Contentlayer: - -```bash -npx degit 'timlrx/tailwind-nextjs-starter-blog#contentlayer' -``` - -or JS (official support) +1. JS (official support) ```bash npx degit https://github.com/timlrx/tailwind-nextjs-starter-blog.git ``` +or with TypeScript (community support) + +```bash +npx degit timlrx/tailwind-nextjs-starter-blog#typescript +``` + 2. Personalize `siteMetadata.js` (site related information) 3. Modify the content security policy in `next.config.js` if you want to use any analytics provider or a commenting solution other than giscus. @@ -188,7 +165,7 @@ You can start editing the page by modifying `pages/index.js`. The page auto-upda Frontmatter follows [Hugo's standards](https://gohugo.io/content-management/front-matter/). -Currently 7 fields are supported. +Currently 10 fields are supported. ``` title (required) @@ -242,4 +219,4 @@ Using the template? Support this effort by giving a star on GitHub, sharing your ## Licence -[MIT](https://github.com/timlrx/tailwind-nextjs-starter-blog/blob/master/LICENSE) © [Timothy Lin](https://www.timlrx.com) +[MIT](https://github.com/timlrx/tailwind-nextjs-starter-blog/blob/master/LICENSE) © [Timothy Lin](https://www.timrlx.com) diff --git a/components/Card.js b/components/Card.tsx similarity index 100% rename from components/Card.js rename to components/Card.tsx diff --git a/components/ClientReload.js b/components/ClientReload.tsx similarity index 92% rename from components/ClientReload.js rename to components/ClientReload.tsx index babfba5..e8713e9 100644 --- a/components/ClientReload.js +++ b/components/ClientReload.tsx @@ -11,7 +11,7 @@ export const ClientReload = () => { useEffect(() => { import('socket.io-client').then((module) => { const socket = module.io() - socket.on('reload', (data) => { + socket.on('reload', () => { Router.replace(Router.asPath, undefined, { scroll: false, }) diff --git a/components/Footer.js b/components/Footer.tsx similarity index 93% rename from components/Footer.js rename to components/Footer.tsx index d4e2121..7b034be 100644 --- a/components/Footer.js +++ b/components/Footer.tsx @@ -7,12 +7,12 @@ export default function Footer() {