txsoura / blog.txsoura.com

This is my blog repository, which is populated with my medium posts.

Home Page:https://blog.txsoura.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Txsoura Blog

I forked this project from Timlrx, so if you want the original project (without my changes), contribute, support or sponsor, go to his profile.

Deploy with Vercel

This is a Next.js, Tailwind CSS blogging starter template. Version 2 is based on Next App directory with React Server Component and gets the posts from medium (I removed some features from the original project).

Check out the documentation below to get started.

Features

  • Next.js with Typescript
  • Easy styling customization with Tailwind 3.0 and primary color attribute
  • Near perfect lighthouse score - Lighthouse report
  • Lightweight, 85kB first load JS
  • Mobile-friendly view
  • Light and dark theme
  • Font optimization with next/font
  • Integration with pliny that provides:
  • Automatic image optimization via next/image
  • Support for nested routing of blog posts
  • Preconfigured security headers.

Quick Start Guide

  1. Clone the repo
npx degit 'txsoura/blog.txsoura.com'
  1. Personalize siteMetadata.js (site-related information)
  2. Modify the content security policy in next.config.js if you want to use another analytics provider or a commenting solution other than giscus.
  3. Create a medium account and get your public profile url
  4. Deploy on Vercel

Installation

yarn

Please note, that if you are using Windows, you may need to run:

set PWD="$(pwd)"

Development

First, run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

Edit the layout in app. With live reloading, the pages auto-update as you edit them.

Extend / Customize

data/siteMetadata.js - contains most of the site-related information that should be modified for a user's need.

data/logo.svg - replace with your own logo.

public/static - store assets such as images and favicons.

tailwind.config.js and css/tailwind.css - tailwind configuration and stylesheet which can be modified to change the overall look and feel of the site.

css/prism.css - controls the styles associated with the code blocks. Feel free to customize it and use your preferred prismjs theme e.g. prism themes.

app - pages to route to. Read the Next.js documentation for more information.

next.config.js - configuration related to Next.js. You need to adapt the Content Security Policy if you want to load scripts, images etc. from other domains.

Post

Every post you do on your Medium, set as public, will be fetched and shown on your blog.

Deploy

Vercel
The easiest way to deploy the template is to deploy on Vercel. Check out the Next.js deployment documentation for more details.

Netlify Netlify’s Next.js runtime configures enable key Next.js functionality on your website without the need for additional configurations. Netlify generates serverless functions that will handle Next.js functionalities such as server-side rendered (SSR) pages, incremental static regeneration (ISR), next/images, etc.

See Next.js on Netlify for suggested configuration values and more details.

Static hosting services / GitHub Pages / S3 / Firebase etc.

  1. Add output: 'export' in next.config.js. See static exports documentation for more information.

  2. Comment out headers() from next.config.js.

  3. Add unoptimized: true to the images key in next.config.js:

    Alternatively, to continue using next/image, you can use an alternative image optimization provider such as Imgix, Cloudinary, or Akamai. See image optimization documentation for more details.

  4. Run yarn build. The generated static content is in the out folder.

  5. Deploy the out folder to your hosting service of choice or run npx serve out to view the website locally.

Note: Deploying on Github pages requires additional modifications to the base path. Please refer to the FAQ for more information.

Licence

MIT © Timothy Lin

About

This is my blog repository, which is populated with my medium posts.

https://blog.txsoura.com

License:MIT License


Languages

Language:TypeScript 74.3%Language:JavaScript 18.1%Language:CSS 5.7%Language:Shell 1.8%Language:Makefile 0.1%