Skip to content

Commit 991b4f4

Browse files
committed
update info
1 parent 8343ace commit 991b4f4

5 files changed

Lines changed: 60 additions & 6 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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

astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { defineConfig } from 'astro/config';
22
import tailwind from '@astrojs/tailwind';
33

44
export default defineConfig({
5+
site: 'https://ivikramsahu.github.io',
6+
trailingSlash: 'always',
57
integrations: [
68
tailwind({
79
applyBaseStyles: false,

src/layouts/BaseLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/pages/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

src/pages/page/[page].astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const start = (currentPage - 1) * pageSize;
3535
const pagePosts = posts.slice(start, start + pageSize);
3636
3737
const 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
4141
function 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">

0 commit comments

Comments
 (0)