File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+ workflow_dispatch :
9+
10+ permissions :
11+ contents : read
12+ pages : write
13+ id-token : write
14+
15+ concurrency :
16+ group : pages
17+ cancel-in-progress : true
18+
19+ jobs :
20+ build :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+
26+ - name : Setup Node
27+ uses : actions/setup-node@v4
28+ with :
29+ node-version : 20
30+ cache : npm
31+
32+ - name : Install dependencies
33+ run : npm ci
34+
35+ - name : Build
36+ run : npm run build
37+
38+ - name : Upload artifact
39+ uses : actions/upload-pages-artifact@v3
40+ with :
41+ path : ./dist
42+
43+ deploy :
44+ needs : build
45+ runs-on : ubuntu-latest
46+ environment :
47+ name : github-pages
48+ url : ${{ steps.deployment.outputs.page_url }}
49+ steps :
50+ - name : Deploy to GitHub Pages
51+ id : deployment
52+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import { defineConfig } from 'astro/config';
22import tailwind from '@astrojs/tailwind' ;
33
44export default defineConfig ( {
5+ site : 'https://ivikramsahu.github.io' ,
6+ trailingSlash : 'always' ,
57 integrations : [
68 tailwind ( {
79 applyBaseStyles : false ,
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ const metaDescription = description ?? 'Writing and notes.';
142142 Blog
143143 </a >
144144 <a
145- href =" /about"
145+ href =" /about/ "
146146 class =" no-underline text-zinc-700 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white"
147147 >
148148 About
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ function renderInlineCode(input: string) {
7979
8080 return (
8181 <a
82- href = { ` /blog/${post .slug } ` }
82+ href = { ` /blog/${post .slug }/ ` }
8383 class = " block p-[30px] no-underline hover:bg-zinc-50 dark:hover:bg-zinc-800"
8484 >
8585 <div class = " space-y-4" >
@@ -161,7 +161,7 @@ function renderInlineCode(input: string) {
161161 Prev
162162 </span >
163163 <a
164- href = " /page/2"
164+ href = " /page/2/ "
165165 class = " rounded-lg border border-zinc-200 px-3 py-2 text-sm text-zinc-700 no-underline hover:bg-zinc-50 dark:border-zinc-800 dark:text-zinc-200 dark:hover:bg-zinc-900"
166166 >
167167 Next
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ const start = (currentPage - 1) * pageSize;
3535const pagePosts = posts .slice (start , start + pageSize );
3636
3737const prevHref =
38- currentPage <= 1 ? null : currentPage === 2 ? ' /' : ` /page/${currentPage - 1 } ` ;
39- const nextHref = currentPage >= totalPages ? null : ` /page/${currentPage + 1 } ` ;
38+ currentPage <= 1 ? null : currentPage === 2 ? ' /' : ` /page/${currentPage - 1 }/ ` ;
39+ const nextHref = currentPage >= totalPages ? null : ` /page/${currentPage + 1 }/ ` ;
4040
4141function estimateReadTimeMinutes(text : string ) {
4242 const words = text .split (/ \s + / ).filter (Boolean ).length ;
@@ -104,7 +104,7 @@ function renderInlineCode(input: string) {
104104
105105 return (
106106 <a
107- href = { ` /blog/${post .slug } ` }
107+ href = { ` /blog/${post .slug }/ ` }
108108 class = " block p-[30px] no-underline hover:bg-zinc-50 dark:hover:bg-zinc-800"
109109 >
110110 <div class = " space-y-4" >
You can’t perform that action at this time.
0 commit comments