commit f596b5ad142d6a077a508bd8595b87b17fe75986 Author: Kenneth Date: Sat Mar 9 22:41:35 2024 +0000 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6240da8 --- /dev/null +++ b/.gitignore @@ -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 diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..1132303 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..fc29074 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..30bab2a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b9ceecd --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml new file mode 100644 index 0000000..b0c1c68 --- /dev/null +++ b/.idea/prettier.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/website.iml b/.idea/website.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/website.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..603ebb0 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "plugins": [ + "prettier-plugin-astro" + ], + "useTabs": true, + "tabWidth": 2 +} \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..56f043d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + "recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"], + "unwantedRecommendations": [] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d642209 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "command": "./node_modules/.bin/astro dev", + "name": "Development server", + "request": "launch", + "type": "node-terminal" + } + ] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..8c4d1a0 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +my website built with [astro](https://astro.build/). do not copy or re-distribute without my prior permission. all rights reserved. diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..b6ed592 --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,11 @@ +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://example.com', + integrations: [mdx(), sitemap(), tailwind()] +}); \ No newline at end of file diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000..5e6aed2 Binary files /dev/null and b/bun.lockb differ diff --git a/package.json b/package.json new file mode 100644 index 0000000..c2ce7d0 --- /dev/null +++ b/package.json @@ -0,0 +1,27 @@ +{ + "name": "website", + "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.6", + "@astrojs/mdx": "^2.1.1", + "@astrojs/rss": "^4.0.5", + "@astrojs/sitemap": "^3.1.1", + "@astrojs/tailwind": "^5.1.0", + "astro": "^4.4.15", + "tailwindcss": "^3.4.1", + "typescript": "^5.4.2" + }, + "devDependencies": { + "@tailwindcss/typography": "^0.5.10", + "prettier": "^3.2.5", + "prettier-plugin-astro": "^0.13.0" + } +} \ No newline at end of file diff --git a/public/grand-plan-for-my-life-hero.webp b/public/grand-plan-for-my-life-hero.webp new file mode 100644 index 0000000..ff1736f Binary files /dev/null and b/public/grand-plan-for-my-life-hero.webp differ diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro new file mode 100644 index 0000000..6c731d0 --- /dev/null +++ b/src/components/BaseHead.astro @@ -0,0 +1,49 @@ +--- +// Import the global.css file here so that it is included on +// all pages through the use of the 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; +--- + + + + + + + + + + + + + + + + + +{title} + + + + + + + + + + + + + + + + diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..85d420c --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,14 @@ +--- +import Link from "./Link.astro"; +const today = new Date(); +--- + +
+
+ github + x.com + email +

inbox open!

+
+

© {today.getFullYear()} kennethnym. all rights reserved.

+
diff --git a/src/components/FormattedDate.astro b/src/components/FormattedDate.astro new file mode 100644 index 0000000..1bcce73 --- /dev/null +++ b/src/components/FormattedDate.astro @@ -0,0 +1,17 @@ +--- +interface Props { + date: Date; +} + +const { date } = Astro.props; +--- + + diff --git a/src/components/Header.astro b/src/components/Header.astro new file mode 100644 index 0000000..95d8141 --- /dev/null +++ b/src/components/Header.astro @@ -0,0 +1,10 @@ +--- +import Link from "./Link.astro"; +--- + +
+ +
diff --git a/src/components/Link.astro b/src/components/Link.astro new file mode 100644 index 0000000..3c7a2f2 --- /dev/null +++ b/src/components/Link.astro @@ -0,0 +1,13 @@ +--- +const { href, class: className, ...props } = Astro.props; +--- + + diff --git a/src/consts.ts b/src/consts.ts new file mode 100644 index 0000000..97ed373 --- /dev/null +++ b/src/consts.ts @@ -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 = 'kennethnym'; +export const SITE_DESCRIPTION = 'dumping ground for my thoughts'; diff --git a/src/content/blog.ts b/src/content/blog.ts new file mode 100644 index 0000000..4a9411c --- /dev/null +++ b/src/content/blog.ts @@ -0,0 +1,12 @@ +import { getCollection } from "astro:content"; + +export async function getBlogs() { + const blogs = await getCollection("blog"); + for (let i = 0; i < blogs.length; i++) { + const blog = blogs[i]; + if (blog.slug === "markdown-style-guide") { + blogs.splice(i, 1); + } + } + return blogs; +} diff --git a/src/content/blog/grand-plan-for-my-life.md b/src/content/blog/grand-plan-for-my-life.md new file mode 100644 index 0000000..2703dab --- /dev/null +++ b/src/content/blog/grand-plan-for-my-life.md @@ -0,0 +1,40 @@ +--- +title: '2024 & the grand plan for my life' +description: 'things i will do before i die' +pubDate: 'Mar 09 2024' +heroImage: /grand-plan-for-my-life-hero.webp +--- + +the following are things i will do in my lifetime, in order of time: +1. prototype and make an untethered consumer AR device +2. move to san francisco and continue work on AR +3. use the money to start working on space tech +4. get employed at a space tech company to gain experience +5. work on space tech on my own +6. achieve, or accelerate human's development to [kardashev scale](https://en.wikipedia.org/wiki/Kardashev_scale) I + +## why? + +i can come up with many rational reasons for why i want to achieve the aforementioned goals. i shall admit, however, that coolness is the primary motivation behind everything (in general, more people should do things purely on the basis that it is cool.) + +## more on AR + +i think AR headsets are the obvious next step after smartphones and personal computers. in an AR device, digital objects seamlessly blend in with the users reality. rather than stealing the user's focus away, it assists in the user's task at hand in an unobtrusive way. a task as simple as telling the time should be an act of second-nature rather than a deliberate act of fetching the device, turn on the screen, then make out the time in the sea of other distractions presented to the user. + +i think the technology to create this AR device is here, and all i have to do is piece the puzzles together. to keep to the point of the post, i shall elaborate on this topic in a separate post. + +## more on space tech + +there is much of space that is yet to be explored and exploited. for example, asteroids contain trillions of dollars worth of minerals that are waiting for humans to be used. coupled with space manufacturing, many heavy industries and manufacturing can be offloaded from Earth, reducing their environmental impact, while reaping the benefit of zero-g manufacturing, and more freedom to expand and grow. + +again, to keep it succinct, i will elaborate further in a separate post. + +## plan for 2024 + +i will build [poly](https://polygui.org), a language-agnostic, cross-platform GUI framework, to a usable enough stage that i can do a alpha/beta release and collect feedbacks from developers. + +in the meantime, i will do research on AR and potentially hack together a prototype that i will daily-drive. this shall be the first step towards the eventual goal of building a consumer-grade AR device. + +## stay tuned + +[follow me on x/twitter](https://x.com/kennethnym) if you wish to follow along on my journey. more is in the oven. diff --git a/src/content/blog/markdown-style-guide.md b/src/content/blog/markdown-style-guide.md new file mode 100644 index 0000000..877ec2f --- /dev/null +++ b/src/content/blog/markdown-style-guide.md @@ -0,0 +1,214 @@ +--- +title: 'Markdown Style Guide' +description: 'Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.' +pubDate: 'Jul 01 2022' +heroImage: '/blog-placeholder-1.jpg' +--- + +Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro. + +## Headings + +The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. + +# H1 + +## H2 + +### H3 + +#### H4 + +##### H5 + +###### H6 + +## Paragraph + +Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. + +Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. + +## Images + +#### Syntax + +```markdown +![Alt text](./full/or/relative/path/of/image) +``` + +#### Output + +![blog placeholder](/blog-placeholder-about.jpg) + +## Blockquotes + +The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. + +### Blockquote without attribution + +#### Syntax + +```markdown +> Tiam, ad mint andaepu dandae nostion secatur sequo quae. +> **Note** that you can use _Markdown syntax_ within a blockquote. +``` + +#### Output + +> Tiam, ad mint andaepu dandae nostion secatur sequo quae. +> **Note** that you can use _Markdown syntax_ within a blockquote. + +### Blockquote with attribution + +#### Syntax + +```markdown +> Don't communicate by sharing memory, share memory by communicating.
+> — Rob Pike[^1] +``` + +#### Output + +> Don't communicate by sharing memory, share memory by communicating.
+> — Rob Pike[^1] + +[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. + +## Tables + +#### Syntax + +```markdown +| Italics | Bold | Code | +| --------- | -------- | ------ | +| _italics_ | **bold** | `code` | +``` + +#### Output + +| Italics | Bold | Code | +| --------- | -------- | ------ | +| _italics_ | **bold** | `code` | + +## Code Blocks + +#### Syntax + +we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntac, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash + +````markdown +```html + + + + + Example HTML5 Document + + +

Test

+ + +``` +```` + +Output + +```html + + + + + Example HTML5 Document + + +

Test

+ + +``` + +## List Types + +### Ordered List + +#### Syntax + +```markdown +1. First item +2. Second item +3. Third item +``` + +#### Output + +1. First item +2. Second item +3. Third item + +### Unordered List + +#### Syntax + +```markdown +- List item +- Another item +- And another item +``` + +#### Output + +- List item +- Another item +- And another item + +### Nested list + +#### Syntax + +```markdown +- Fruit + - Apple + - Orange + - Banana +- Dairy + - Milk + - Cheese +``` + +#### Output + +- Fruit + - Apple + - Orange + - Banana +- Dairy + - Milk + - Cheese + +## Other Elements — abbr, sub, sup, kbd, mark + +#### Syntax + +```markdown +GIF is a bitmap image format. + +H2O + +Xn + Yn = Zn + +Press CTRL+ALT+Delete to end the session. + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. +``` + +#### Output + +GIF is a bitmap image format. + +H2O + +Xn + Yn = Zn + +Press CTRL+ALT+Delete to end the session. + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. diff --git a/src/content/config.ts b/src/content/config.ts new file mode 100644 index 0000000..667a31c --- /dev/null +++ b/src/content/config.ts @@ -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 }; diff --git a/src/env.d.ts b/src/env.d.ts new file mode 100644 index 0000000..acef35f --- /dev/null +++ b/src/env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro new file mode 100644 index 0000000..d8d082d --- /dev/null +++ b/src/layouts/BlogPost.astro @@ -0,0 +1,45 @@ +--- +import type { CollectionEntry } from "astro:content"; +import BaseHead from "../components/BaseHead.astro"; +import Header from "../components/Header.astro"; +import Footer from "../components/Footer.astro"; +import FormattedDate from "../components/FormattedDate.astro"; + +type Props = CollectionEntry<"blog">["data"]; + +const { title, description, pubDate, updatedDate, heroImage } = Astro.props; +--- + + + + + + + +
+
+
+
+
+
+ + { + updatedDate && ( +
+ Last updated on + +
+ ) + } +
+

{title}

+
+
+ +
+
+
+
+