-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 679c773
Showing
35 changed files
with
5,393 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
# Trigger the workflow every time you push to the `main` branch | ||
# Using a different branch name? Replace `main` with your branch’s name | ||
push: | ||
branches: [main] | ||
# Allows you to run this workflow manually from the Actions tab on GitHub. | ||
workflow_dispatch: | ||
|
||
# Allow this job to clone the repo and create a page deployment | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout your repository using git | ||
uses: actions/checkout@v4 | ||
- name: Install, build, and upload your site | ||
uses: withastro/action@v2 | ||
# with: | ||
# path: . # The root location of your Astro project inside the repository. (optional) | ||
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional) | ||
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# build output | ||
dist/ | ||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** @type {import("prettier").Config} */ | ||
export default { | ||
plugins: ['prettier-plugin-astro'], | ||
overrides: [ | ||
{ | ||
files: '*.astro', | ||
options: { | ||
parser: 'astro', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"], | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# My Learning Path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import mdx from '@astrojs/mdx'; | ||
import sitemap from '@astrojs/sitemap'; | ||
|
||
import tailwind from "@astrojs/tailwind"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
site: 'https://soulinmaikadua.github.io', | ||
base: "nkauj", | ||
integrations: [mdx(), sitemap(), tailwind()] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "callous-corot", | ||
"type": "module", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro check && astro build", | ||
"preview": "astro preview", | ||
"astro": "astro" | ||
}, | ||
"dependencies": { | ||
"@astrojs/check": "^0.5.9", | ||
"@astrojs/mdx": "^2.2.0", | ||
"@astrojs/rss": "^4.0.5", | ||
"@astrojs/sitemap": "^3.1.1", | ||
"@astrojs/tailwind": "^5.1.0", | ||
"astro": "^4.5.3", | ||
"astro-heroicons": "^2.1.1", | ||
"tailwindcss": "^3.4.1", | ||
"typescript": "^5.4.2" | ||
}, | ||
"devDependencies": { | ||
"prettier": "^3.2.5", | ||
"prettier-plugin-astro": "^0.13.0" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
// Import the global.css file here so that it is included on | ||
// all pages through the use of the <BaseHead /> component. | ||
import '../styles/global.css'; | ||
interface Props { | ||
title: string; | ||
description: string; | ||
image?: string; | ||
} | ||
const canonicalURL = new URL(Astro.url.pathname, Astro.site); | ||
const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props; | ||
--- | ||
|
||
<!-- Global Metadata --> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1" /> | ||
<link rel="icon" type="icon" href="/my-learning-path/favicon.ico" /> | ||
<meta name="generator" content={Astro.generator} /> | ||
|
||
<!-- Canonical URL --> | ||
<link rel="canonical" href={canonicalURL} /> | ||
|
||
<!-- Primary Meta Tags --> | ||
<title>{title}</title> | ||
<meta name="title" content={title} /> | ||
<meta name="description" content={description} /> | ||
|
||
<!-- Open Graph / Facebook --> | ||
<meta property="og:type" content="website" /> | ||
<meta property="og:url" content={Astro.url} /> | ||
<meta property="og:title" content={title} /> | ||
<meta property="og:description" content={description} /> | ||
<meta property="og:image" content={new URL(image, Astro.url)} /> | ||
|
||
<!-- Twitter --> | ||
<meta property="twitter:card" content="summary_large_image" /> | ||
<meta property="twitter:url" content={Astro.url} /> | ||
<meta property="twitter:title" content={title} /> | ||
<meta property="twitter:description" content={description} /> | ||
<meta property="twitter:image" content={new URL(image, Astro.url)} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
const today = new Date(); | ||
--- | ||
|
||
<footer> | ||
<hr class="my-6" /> | ||
© {today.getFullYear()} My Learning Path. All rights reserved. | ||
<div class="social-links"> | ||
<a href="https://github.com/soulinmaikadua/my-learning-path" target="_blank"> | ||
<span class="sr-only">Go to Soulinmaikadua's GitHub repo</span> | ||
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32" astro-icon="social/github" | ||
><path | ||
fill="currentColor" | ||
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z" | ||
></path></svg | ||
> | ||
</a> | ||
</div> | ||
</footer> | ||
<style> | ||
footer { | ||
padding: 2em 1em 6em 1em; | ||
color: rgb(var(--gray)); | ||
text-align: center; | ||
} | ||
.social-links { | ||
display: flex; | ||
justify-content: center; | ||
gap: 1em; | ||
margin-top: 1em; | ||
} | ||
.social-links a { | ||
text-decoration: none; | ||
color: rgb(var(--gray)); | ||
} | ||
.social-links a:hover { | ||
color: rgb(var(--gray-dark)); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
import HeaderLink from './HeaderLink.astro'; | ||
import { SITE_TITLE } from '../consts'; | ||
--- | ||
|
||
<header class="bg-black text-white"> | ||
<nav> | ||
<h2><a href="/my-learning-path/">{SITE_TITLE}</a></h2> | ||
<div class="internal-links"> | ||
<HeaderLink href="/my-learning-path/">Home</HeaderLink> | ||
<HeaderLink href="/my-learning-path/learning">Learning</HeaderLink> | ||
</div> | ||
<div class="social-links"> | ||
<a href="https://github.com/soulinmaikadua/my-learning-path" target="_blank"> | ||
<span class="sr-only">Go to Astro's GitHub repo</span> | ||
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32" | ||
><path | ||
fill="currentColor" | ||
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z" | ||
></path></svg | ||
> | ||
</a> | ||
</div> | ||
</nav> | ||
</header> | ||
<style> | ||
header { | ||
margin: 0; | ||
padding: 0 1em; | ||
box-shadow: 0 2px 8px rgba(var(--black), 5%); | ||
} | ||
h2 { | ||
margin: 0; | ||
font-size: 1em; | ||
} | ||
|
||
h2 a, | ||
h2 a.active { | ||
text-decoration: none; | ||
} | ||
nav { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
nav a { | ||
padding: 1em 0.5em; | ||
color: var(--black); | ||
border-bottom: 4px solid transparent; | ||
text-decoration: none; | ||
} | ||
nav a.active { | ||
text-decoration: none; | ||
border-bottom-color: var(--accent); | ||
} | ||
.social-links, | ||
.social-links a { | ||
display: flex; | ||
} | ||
@media (max-width: 720px) { | ||
.social-links { | ||
display: none; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
import type { HTMLAttributes } from 'astro/types'; | ||
type Props = HTMLAttributes<'a'>; | ||
const { href, class: className, ...props } = Astro.props; | ||
const { pathname } = Astro.url; | ||
const subpath = pathname.match(/[^\/]+/g); | ||
const isActive = href === pathname || href === '/' + subpath?.[0]; | ||
--- | ||
|
||
<a href={href} class:list={[className, { active: isActive }]} {...props}> | ||
<slot /> | ||
</a> | ||
<style> | ||
a { | ||
display: inline-block; | ||
text-decoration: none; | ||
} | ||
a.active { | ||
font-weight: bolder; | ||
text-decoration: underline; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Place any global data in this file. | ||
// You can import this data from anywhere in your site by using the `import` keyword. | ||
|
||
export const SITE_TITLE = "My Learning Path"; | ||
export const SITE_DESCRIPTION = "Welcome to my website!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { defineCollection, z } from 'astro:content'; | ||
|
||
const blog = defineCollection({ | ||
type: 'content', | ||
// Type-check frontmatter using a schema | ||
schema: z.object({ | ||
title: z.string(), | ||
description: z.string(), | ||
// Transform string to Date object | ||
pubDate: z.coerce.date(), | ||
updatedDate: z.coerce.date().optional(), | ||
heroImage: z.string().optional(), | ||
}), | ||
}); | ||
|
||
export const collections = { blog }; |
Oops, something went wrong.