~repos /website
git clone https://pyrossh.dev/repos/website.git
木 Personal website of pyrossh. Built with astrojs, shiki, vite.
05ffaae3
—
pyrossh 7 months ago
update site
- src2/routes/+error.svelte → +error.svelte +0 -0
- .eslintignore +0 -13
- .eslintrc.cjs +0 -15
- .prettierignore +0 -4
- .prettierrc +0 -15
- {src2/routes/only-bible-app → only-bible-app}/+layout.svelte +0 -0
- {src2/routes/only-bible-app → only-bible-app}/+page.svelte +0 -0
- {src2/routes/only-bible-app → only-bible-app}/privacy-policy/+page.svelte +0 -0
- {src2/routes/only-bible-app → only-bible-app}/terms-and-conditions/+page.svelte +0 -0
- package.json +2 -2
- package2.json +0 -46
- playwright.config.js +0 -11
- public/blog-placeholder-1.jpg +0 -0
- public/blog-placeholder-2.jpg +0 -0
- public/blog-placeholder-3.jpg +0 -0
- public/blog-placeholder-4.jpg +0 -0
- public/blog-placeholder-5.jpg +0 -0
- public/blog-placeholder-about.jpg +0 -0
- {static → public}/favicon.curve +0 -0
- {static → public}/favicon.png +0 -0
- {static → public}/robots.txt +0 -0
- {static → src/assets}/images/desktop.png +0 -0
- {static → src/assets}/images/email1.png +0 -0
- {static → src/assets}/images/gdx-studio.png +0 -0
- {static → src/assets}/images/gopibot.png +0 -0
- {static → src/assets}/images/gromer.png +0 -0
- {static → src/assets}/images/pine.png +0 -0
- {static → src/assets}/images/rust-embed.png +0 -0
- {static → src/assets}/images/terminal1.png +0 -0
- src/content.config.ts +14 -15
- src/content/blog/first-post.md +0 -16
- src/content/blog/markdown-style-guide.md +0 -214
- src/content/blog/second-post.md +0 -16
- src/content/blog/third-post.md +0 -16
- src/content/blog/using-mdx.mdx +0 -31
- src/content/{blog/eyecandy-golang-error-reporting.md → eyecandy-golang-error-reporting.md} +2 -3
- src/content/{blog/gopibot-to-the-rescue.md → gopibot-to-the-rescue.md} +2 -8
- src/content/{blog/react-powertools-swr.md → react-powertools-swr.md} +10 -13
- src/pages/cv/index.astro +1 -6
- src/pages/index.astro +7 -4
- src/pages/posts/[...slug].astro +72 -44
- src/pages/posts/index.astro +2 -9
- src2/app.css +0 -1
- src2/app.d.ts +0 -15
- src2/app.html +0 -28
- src2/index.test.js +0 -7
- src2/routes/+layout.js +0 -2
- src2/routes/+layout.svelte +0 -58
- src2/routes/+page.svelte +0 -245
- src2/routes/cv/+page.svelte +0 -4
- src2/routes/posts/+page.js +0 -7
- src2/routes/posts/+page.svelte +0 -26
- src2/routes/posts/[slug]/+page.js +0 -13
- src2/routes/posts/[slug]/+page.svelte +0 -77
- src2/routes/sitemap.xml/+server.js +0 -12
- src2/vite-env.d.ts +0 -1
- svelte.config.js +0 -50
- vite.config.js +0 -12
src2/routes/+error.svelte → +error.svelte
RENAMED
|
File without changes
|
.eslintignore
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
.DS_Store
|
|
2
|
-
node_modules
|
|
3
|
-
/build
|
|
4
|
-
/.svelte-kit
|
|
5
|
-
/package
|
|
6
|
-
.env
|
|
7
|
-
.env.*
|
|
8
|
-
!.env.example
|
|
9
|
-
|
|
10
|
-
# Ignore files for PNPM, NPM and YARN
|
|
11
|
-
pnpm-lock.yaml
|
|
12
|
-
package-lock.json
|
|
13
|
-
yarn.lock
|
.eslintrc.cjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/** @type { import("eslint").Linter.Config } */
|
|
2
|
-
module.exports = {
|
|
3
|
-
root: true,
|
|
4
|
-
extends: ['eslint:recommended', 'plugin:svelte/recommended', 'prettier'],
|
|
5
|
-
parserOptions: {
|
|
6
|
-
sourceType: 'module',
|
|
7
|
-
ecmaVersion: 2020,
|
|
8
|
-
extraFileExtensions: ['.svelte'],
|
|
9
|
-
},
|
|
10
|
-
env: {
|
|
11
|
-
browser: true,
|
|
12
|
-
es2017: true,
|
|
13
|
-
node: true,
|
|
14
|
-
},
|
|
15
|
-
};
|
.prettierignore
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
# Ignore files for PNPM, NPM and YARN
|
|
2
|
-
pnpm-lock.yaml
|
|
3
|
-
package-lock.json
|
|
4
|
-
yarn.lock
|
.prettierrc
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"useTabs": true,
|
|
3
|
-
"singleQuote": true,
|
|
4
|
-
"trailingComma": "all",
|
|
5
|
-
"printWidth": 100,
|
|
6
|
-
"plugins": ["prettier-plugin-svelte"],
|
|
7
|
-
"overrides": [
|
|
8
|
-
{
|
|
9
|
-
"files": "*.svelte",
|
|
10
|
-
"options": {
|
|
11
|
-
"parser": "svelte"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
}
|
{src2/routes/only-bible-app → only-bible-app}/+layout.svelte
RENAMED
|
File without changes
|
{src2/routes/only-bible-app → only-bible-app}/+page.svelte
RENAMED
|
File without changes
|
{src2/routes/only-bible-app → only-bible-app}/privacy-policy/+page.svelte
RENAMED
|
File without changes
|
{src2/routes/only-bible-app → only-bible-app}/terms-and-conditions/+page.svelte
RENAMED
|
File without changes
|
package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "website",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.1",
|
|
5
5
|
"scripts": {
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
"astro": "^5.7.5",
|
|
18
18
|
"tailwindcss": "^4.1.4"
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
package2.json
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "website",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite dev",
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"preview": "vite preview",
|
|
10
|
-
"publish": "rm -rf build && npm run build && tar -C build -cvz . > site.tar.gz && hut pages publish -d pyrossh.dev site.tar.gz && rm site.tar.gz",
|
|
11
|
-
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
|
|
12
|
-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
|
|
13
|
-
"test": "npm run test:integration && npm run test:unit",
|
|
14
|
-
"lint": "prettier --check . && eslint .",
|
|
15
|
-
"fmt": "prettier --write .",
|
|
16
|
-
"test:integration": "playwright test",
|
|
17
|
-
"test:unit": "vitest"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@iconify/svelte": "^4.0.2",
|
|
21
|
-
"@playwright/test": "^1.48.2",
|
|
22
|
-
"@poppanator/sveltekit-svg": "^5.0.0",
|
|
23
|
-
"@sveltejs/adapter-static": "^3.0.6",
|
|
24
|
-
"@sveltejs/enhanced-img": "^0.3.10",
|
|
25
|
-
"@sveltejs/kit": "^2.7.3",
|
|
26
|
-
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
27
|
-
"@sveltejs/vite-plugin-svelte-inspector": "^3.0.1",
|
|
28
|
-
"@tailwindcss/vite": "^4.0.3",
|
|
29
|
-
"@types/eslint": "8.56.0",
|
|
30
|
-
"autoprefixer": "^10.4.19",
|
|
31
|
-
"eslint": "^8.56.0",
|
|
32
|
-
"eslint-config-prettier": "^9.1.0",
|
|
33
|
-
"eslint-plugin-svelte": "^2.45.1",
|
|
34
|
-
"mdsvex": "^0.12.3",
|
|
35
|
-
"prettier": "^3.3.3",
|
|
36
|
-
"prettier-plugin-svelte": "^3.2.7",
|
|
37
|
-
"remark-github": "^12.0.0",
|
|
38
|
-
"shiki": "^1.22.1",
|
|
39
|
-
"super-sitemap": "^0.14.14",
|
|
40
|
-
"svelte": "^5.1.3",
|
|
41
|
-
"svelte-check": "^4.0.5",
|
|
42
|
-
"tailwindcss": "^4.0.3",
|
|
43
|
-
"vite": "^5.4.10",
|
|
44
|
-
"vitest": "^2.1.3"
|
|
45
|
-
}
|
|
46
|
-
}
|
playwright.config.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
2
|
-
const config = {
|
|
3
|
-
webServer: {
|
|
4
|
-
command: 'npm run build && npm run preview',
|
|
5
|
-
port: 4173,
|
|
6
|
-
},
|
|
7
|
-
testDir: 'tests',
|
|
8
|
-
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default config;
|
public/blog-placeholder-1.jpg
DELETED
|
Binary file
|
public/blog-placeholder-2.jpg
DELETED
|
Binary file
|
public/blog-placeholder-3.jpg
DELETED
|
Binary file
|
public/blog-placeholder-4.jpg
DELETED
|
Binary file
|
public/blog-placeholder-5.jpg
DELETED
|
Binary file
|
public/blog-placeholder-about.jpg
DELETED
|
Binary file
|
{static → public}/favicon.curve
RENAMED
|
File without changes
|
{static → public}/favicon.png
RENAMED
|
File without changes
|
{static → public}/robots.txt
RENAMED
|
File without changes
|
{static → src/assets}/images/desktop.png
RENAMED
|
File without changes
|
{static → src/assets}/images/email1.png
RENAMED
|
File without changes
|
{static → src/assets}/images/gdx-studio.png
RENAMED
|
File without changes
|
{static → src/assets}/images/gopibot.png
RENAMED
|
File without changes
|
{static → src/assets}/images/gromer.png
RENAMED
|
File without changes
|
{static → src/assets}/images/pine.png
RENAMED
|
File without changes
|
{static → src/assets}/images/rust-embed.png
RENAMED
|
File without changes
|
{static → src/assets}/images/terminal1.png
RENAMED
|
File without changes
|
src/content.config.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { glob } from 'astro/loaders';
|
|
2
2
|
import { defineCollection, z } from 'astro:content';
|
|
3
3
|
|
|
4
|
+
export const collections = {
|
|
4
|
-
|
|
5
|
+
content: defineCollection({
|
|
5
|
-
// Load Markdown and MDX files in the `src/content/blog/` directory.
|
|
6
|
-
|
|
6
|
+
loader: glob({ base: './src/content', pattern: '**/*.{md,mdx}' }),
|
|
7
|
-
|
|
7
|
+
// Type-check frontmatter using a schema
|
|
8
|
-
|
|
8
|
+
schema: z.object({
|
|
9
|
-
|
|
9
|
+
title: z.string(),
|
|
10
|
-
|
|
10
|
+
description: z.string(),
|
|
11
|
-
|
|
11
|
+
// Transform string to Date object
|
|
12
|
-
|
|
12
|
+
pubDate: z.coerce.date(),
|
|
13
|
-
|
|
13
|
+
updatedDate: z.coerce.date().optional(),
|
|
14
|
-
|
|
14
|
+
heroImage: z.string().optional(),
|
|
15
|
-
|
|
15
|
+
}),
|
|
16
|
-
})
|
|
16
|
+
}),
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
};
|
src/content/blog/first-post.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'First post'
|
|
3
|
-
description: 'Lorem ipsum dolor sit amet'
|
|
4
|
-
pubDate: 'Jul 08 2022'
|
|
5
|
-
heroImage: '/blog-placeholder-3.jpg'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
|
9
|
-
|
|
10
|
-
Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa ultricies mi.
|
|
11
|
-
|
|
12
|
-
Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed risus pretium quam vulputate. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare. Fringilla urna porttitor rhoncus dolor purus non. Amet dictum sit amet justo donec enim.
|
|
13
|
-
|
|
14
|
-
Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi.
|
|
15
|
-
|
|
16
|
-
Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique magna.
|
src/content/blog/markdown-style-guide.md
DELETED
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Markdown Style Guide'
|
|
3
|
-
description: 'Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.'
|
|
4
|
-
pubDate: 'Jun 19 2024'
|
|
5
|
-
heroImage: '/blog-placeholder-1.jpg'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.
|
|
9
|
-
|
|
10
|
-
## Headings
|
|
11
|
-
|
|
12
|
-
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
|
13
|
-
|
|
14
|
-
# H1
|
|
15
|
-
|
|
16
|
-
## H2
|
|
17
|
-
|
|
18
|
-
### H3
|
|
19
|
-
|
|
20
|
-
#### H4
|
|
21
|
-
|
|
22
|
-
##### H5
|
|
23
|
-
|
|
24
|
-
###### H6
|
|
25
|
-
|
|
26
|
-
## Paragraph
|
|
27
|
-
|
|
28
|
-
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.
|
|
29
|
-
|
|
30
|
-
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
|
31
|
-
|
|
32
|
-
## Images
|
|
33
|
-
|
|
34
|
-
### Syntax
|
|
35
|
-
|
|
36
|
-
```markdown
|
|
37
|
-

|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Output
|
|
41
|
-
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
## Blockquotes
|
|
45
|
-
|
|
46
|
-
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.
|
|
47
|
-
|
|
48
|
-
### Blockquote without attribution
|
|
49
|
-
|
|
50
|
-
#### Syntax
|
|
51
|
-
|
|
52
|
-
```markdown
|
|
53
|
-
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
|
54
|
-
> **Note** that you can use _Markdown syntax_ within a blockquote.
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
#### Output
|
|
58
|
-
|
|
59
|
-
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
|
60
|
-
> **Note** that you can use _Markdown syntax_ within a blockquote.
|
|
61
|
-
|
|
62
|
-
### Blockquote with attribution
|
|
63
|
-
|
|
64
|
-
#### Syntax
|
|
65
|
-
|
|
66
|
-
```markdown
|
|
67
|
-
> Don't communicate by sharing memory, share memory by communicating.<br>
|
|
68
|
-
> — <cite>Rob Pike[^1]</cite>
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
#### Output
|
|
72
|
-
|
|
73
|
-
> Don't communicate by sharing memory, share memory by communicating.<br>
|
|
74
|
-
> — <cite>Rob Pike[^1]</cite>
|
|
75
|
-
|
|
76
|
-
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
|
77
|
-
|
|
78
|
-
## Tables
|
|
79
|
-
|
|
80
|
-
### Syntax
|
|
81
|
-
|
|
82
|
-
```markdown
|
|
83
|
-
| Italics | Bold | Code |
|
|
84
|
-
| --------- | -------- | ------ |
|
|
85
|
-
| _italics_ | **bold** | `code` |
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Output
|
|
89
|
-
|
|
90
|
-
| Italics | Bold | Code |
|
|
91
|
-
| --------- | -------- | ------ |
|
|
92
|
-
| _italics_ | **bold** | `code` |
|
|
93
|
-
|
|
94
|
-
## Code Blocks
|
|
95
|
-
|
|
96
|
-
### Syntax
|
|
97
|
-
|
|
98
|
-
we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntax, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash
|
|
99
|
-
|
|
100
|
-
````markdown
|
|
101
|
-
```html
|
|
102
|
-
<!doctype html>
|
|
103
|
-
<html lang="en">
|
|
104
|
-
<head>
|
|
105
|
-
<meta charset="utf-8" />
|
|
106
|
-
<title>Example HTML5 Document</title>
|
|
107
|
-
</head>
|
|
108
|
-
<body>
|
|
109
|
-
<p>Test</p>
|
|
110
|
-
</body>
|
|
111
|
-
</html>
|
|
112
|
-
```
|
|
113
|
-
````
|
|
114
|
-
|
|
115
|
-
### Output
|
|
116
|
-
|
|
117
|
-
```html
|
|
118
|
-
<!doctype html>
|
|
119
|
-
<html lang="en">
|
|
120
|
-
<head>
|
|
121
|
-
<meta charset="utf-8" />
|
|
122
|
-
<title>Example HTML5 Document</title>
|
|
123
|
-
</head>
|
|
124
|
-
<body>
|
|
125
|
-
<p>Test</p>
|
|
126
|
-
</body>
|
|
127
|
-
</html>
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## List Types
|
|
131
|
-
|
|
132
|
-
### Ordered List
|
|
133
|
-
|
|
134
|
-
#### Syntax
|
|
135
|
-
|
|
136
|
-
```markdown
|
|
137
|
-
1. First item
|
|
138
|
-
2. Second item
|
|
139
|
-
3. Third item
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
#### Output
|
|
143
|
-
|
|
144
|
-
1. First item
|
|
145
|
-
2. Second item
|
|
146
|
-
3. Third item
|
|
147
|
-
|
|
148
|
-
### Unordered List
|
|
149
|
-
|
|
150
|
-
#### Syntax
|
|
151
|
-
|
|
152
|
-
```markdown
|
|
153
|
-
- List item
|
|
154
|
-
- Another item
|
|
155
|
-
- And another item
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
#### Output
|
|
159
|
-
|
|
160
|
-
- List item
|
|
161
|
-
- Another item
|
|
162
|
-
- And another item
|
|
163
|
-
|
|
164
|
-
### Nested list
|
|
165
|
-
|
|
166
|
-
#### Syntax
|
|
167
|
-
|
|
168
|
-
```markdown
|
|
169
|
-
- Fruit
|
|
170
|
-
- Apple
|
|
171
|
-
- Orange
|
|
172
|
-
- Banana
|
|
173
|
-
- Dairy
|
|
174
|
-
- Milk
|
|
175
|
-
- Cheese
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
#### Output
|
|
179
|
-
|
|
180
|
-
- Fruit
|
|
181
|
-
- Apple
|
|
182
|
-
- Orange
|
|
183
|
-
- Banana
|
|
184
|
-
- Dairy
|
|
185
|
-
- Milk
|
|
186
|
-
- Cheese
|
|
187
|
-
|
|
188
|
-
## Other Elements — abbr, sub, sup, kbd, mark
|
|
189
|
-
|
|
190
|
-
### Syntax
|
|
191
|
-
|
|
192
|
-
```markdown
|
|
193
|
-
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
|
194
|
-
|
|
195
|
-
H<sub>2</sub>O
|
|
196
|
-
|
|
197
|
-
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|
198
|
-
|
|
199
|
-
Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
|
|
200
|
-
|
|
201
|
-
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### Output
|
|
205
|
-
|
|
206
|
-
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
|
207
|
-
|
|
208
|
-
H<sub>2</sub>O
|
|
209
|
-
|
|
210
|
-
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|
211
|
-
|
|
212
|
-
Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
|
|
213
|
-
|
|
214
|
-
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
src/content/blog/second-post.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Second post'
|
|
3
|
-
description: 'Lorem ipsum dolor sit amet'
|
|
4
|
-
pubDate: 'Jul 15 2022'
|
|
5
|
-
heroImage: '/blog-placeholder-4.jpg'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
|
9
|
-
|
|
10
|
-
Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa ultricies mi.
|
|
11
|
-
|
|
12
|
-
Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed risus pretium quam vulputate. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare. Fringilla urna porttitor rhoncus dolor purus non. Amet dictum sit amet justo donec enim.
|
|
13
|
-
|
|
14
|
-
Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi.
|
|
15
|
-
|
|
16
|
-
Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique magna.
|
src/content/blog/third-post.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Third post'
|
|
3
|
-
description: 'Lorem ipsum dolor sit amet'
|
|
4
|
-
pubDate: 'Jul 22 2022'
|
|
5
|
-
heroImage: '/blog-placeholder-2.jpg'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
|
9
|
-
|
|
10
|
-
Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa ultricies mi.
|
|
11
|
-
|
|
12
|
-
Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed risus pretium quam vulputate. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare. Fringilla urna porttitor rhoncus dolor purus non. Amet dictum sit amet justo donec enim.
|
|
13
|
-
|
|
14
|
-
Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi.
|
|
15
|
-
|
|
16
|
-
Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique magna.
|
src/content/blog/using-mdx.mdx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Using MDX'
|
|
3
|
-
description: 'Lorem ipsum dolor sit amet'
|
|
4
|
-
pubDate: 'Jun 01 2024'
|
|
5
|
-
heroImage: '/blog-placeholder-5.jpg'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
This theme comes with the [@astrojs/mdx](https://docs.astro.build/en/guides/integrations-guide/mdx/) integration installed and configured in your `astro.config.mjs` config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file.
|
|
9
|
-
|
|
10
|
-
## Why MDX?
|
|
11
|
-
|
|
12
|
-
MDX is a special flavor of Markdown that supports embedded JavaScript & JSX syntax. This unlocks the ability to [mix JavaScript and UI Components into your Markdown content](https://docs.astro.build/en/guides/markdown-content/#mdx-features) for things like interactive charts or alerts.
|
|
13
|
-
|
|
14
|
-
If you have existing content authored in MDX, this integration will hopefully make migrating to Astro a breeze.
|
|
15
|
-
|
|
16
|
-
## Example
|
|
17
|
-
|
|
18
|
-
Here is how you import and use a UI component inside of MDX.
|
|
19
|
-
When you open this page in the browser, you should see the clickable button below.
|
|
20
|
-
|
|
21
|
-
import HeaderLink from '../../components/HeaderLink.astro';
|
|
22
|
-
|
|
23
|
-
<HeaderLink href="#" onclick="alert('clicked!')">
|
|
24
|
-
Embedded component in MDX
|
|
25
|
-
</HeaderLink>
|
|
26
|
-
|
|
27
|
-
## More Links
|
|
28
|
-
|
|
29
|
-
- [MDX Syntax Documentation](https://mdxjs.com/docs/what-is-mdx)
|
|
30
|
-
- [Astro Usage Documentation](https://docs.astro.build/en/guides/markdown-content/#markdown-and-mdx-pages)
|
|
31
|
-
- **Note:** [Client Directives](https://docs.astro.build/en/reference/directives-reference/#client-directives) are still required to create interactive components. Otherwise, all components in your MDX will render as static HTML (no JavaScript) by default.
|
src/content/{blog/eyecandy-golang-error-reporting.md → eyecandy-golang-error-reporting.md}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Eyecandy golang error reporting
|
|
3
3
|
description: Better error message logging in golang
|
|
4
|
-
heroImage: /images/terminal1.png
|
|
5
4
|
pubDate: 2016-09-17
|
|
6
5
|
tags:
|
|
7
6
|
- golang
|
|
@@ -71,7 +70,7 @@ https://github.com/maruel/panicparse/issues/8
|
|
|
71
70
|
with the developer and +1’s we got a proper api which I could use.
|
|
72
71
|
And now I haz got a prettier stack traces like this,
|
|
73
72
|
|
|
74
|
-

|
|
73
|
+

|
|
75
74
|
|
|
76
75
|
So great I got ANSI coloring setup and the errors look great in our console but what about our
|
|
77
76
|
mails. Of course this wasn’t going to work since emails primarily render text and HTML only, and
|
|
@@ -87,4 +86,4 @@ https://github.com/aymerick/douceur
|
|
|
87
86
|
|
|
88
87
|
Finally after messing around with so many libraries I got around to getting it to work and this is how it looks in my email,
|
|
89
88
|
|
|
90
|
-

|
|
89
|
+

|
src/content/{blog/gopibot-to-the-rescue.md → gopibot-to-the-rescue.md}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Gopibot to the rescue
|
|
3
3
|
description: A slackbot for deploying your applications (chatops)
|
|
4
|
-
heroImage: /images/gopibot.png
|
|
5
4
|
pubDate: 2017-04-19
|
|
6
5
|
tags:
|
|
7
6
|
- nodejs
|
|
@@ -11,13 +10,6 @@ tags:
|
|
|
11
10
|
published: true
|
|
12
11
|
---
|
|
13
12
|
|
|
14
|
-
High Ho Gopibot away!
|
|
15
|
-
|
|
16
|
-
Everybody please meet Gopibot our chatops bot which I built at Numberz to help us deploy our countless microservices to QA.
|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
So here is the backstory,
|
|
21
13
|
I was one of the developers who had access to our QA and Prod servers and the other person was the Head of Engineering and he is generally a busy guy.
|
|
22
14
|
So whenever there is a change that needs to be deployed everyone comes to me and tells me to deploy their microservice/frontend to the QA and blatantly
|
|
23
15
|
interrupts my awesome coding cycle.
|
|
@@ -135,6 +127,8 @@ Initially the bot was called deploybot and had a rocket icon but then there was
|
|
|
135
127
|
a mini him would be better and give the bot a real person’s personality and it worked and people kind a started talking to bot some random stuff and
|
|
136
128
|
all.
|
|
137
129
|
|
|
130
|
+

|
|
131
|
+
|
|
138
132
|
Further on we can maybe introduce natural language processing and deep learning to make the bot learn from our messages and not just take a single
|
|
139
133
|
command. Like instead of me saying @gopibot cfm I can say @gopibot please deploy our cashflow server or please revert the deployment to the previous
|
|
140
134
|
version and things like that.
|
src/content/{blog/react-powertools-swr.md → react-powertools-swr.md}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 'React Powertools: SWR'
|
|
3
3
|
description: A react library that makes it easier to fetch data
|
|
4
|
-
heroImage: /images/gopibot.png
|
|
5
4
|
pubDate: 2024-08-16
|
|
6
5
|
tags:
|
|
7
6
|
- react
|
|
@@ -196,15 +195,13 @@ function Profile() {
|
|
|
196
195
|
```
|
|
197
196
|
|
|
198
197
|
**Parameters**
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
* `key`: a unique key string for the request
|
|
201
|
-
|
|
199
|
+
* `fetcher(key, { arg })`: an async function for remote mutation
|
|
202
|
-
|
|
200
|
+
* `options`: an optional object to configure revalidation and optimistic updates
|
|
203
|
-
|
|
201
|
+
|
|
204
|
-
**
|
|
202
|
+
**Returns**
|
|
205
|
-
|
|
206
|
-
- `data`: data for the given key returned from the update request
|
|
203
|
+
- `data`: data for the given key returned from the update request
|
|
207
|
-
- `error`: error thrown by the request
|
|
204
|
+
- `error`: error thrown by the request
|
|
208
|
-
- `trigger(arg, options)`: a function to trigger a remote mutation
|
|
205
|
+
- `trigger(arg, options)`: a function to trigger a remote mutation
|
|
209
|
-
- `reset`: a function to reset the state
|
|
206
|
+
- `reset`: a function to reset the state
|
|
210
|
-
- `isMutating`: if there's an ongoing update request
|
|
207
|
+
- `isMutating`: if there's an ongoing update request
|
src/pages/cv/index.astro
CHANGED
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
import Layout from '@/layouts/Base.astro';
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
<Layout
|
|
6
|
-
title="CV"
|
|
7
|
-
|
|
5
|
+
<Layout title="pyrossh | cv" description="Peter John's CV">
|
|
8
|
-
pubDate={new Date('August 08 2021')}
|
|
9
|
-
heroImage="/blog-placeholder-about.jpg"
|
|
10
|
-
>
|
|
11
6
|
<div>
|
|
12
7
|
<section>
|
|
13
8
|
<h3>Equal Experts</h3>
|
src/pages/index.astro
CHANGED
|
@@ -47,7 +47,10 @@ import inkscape from '@/assets/logos/inkscape.png';
|
|
|
47
47
|
}
|
|
48
48
|
</style>
|
|
49
49
|
|
|
50
|
-
<Layout
|
|
50
|
+
<Layout
|
|
51
|
+
title="pyrossh"
|
|
52
|
+
description="Tech Lead from Bangalore who likes to create frameworks and programming languages."
|
|
53
|
+
>
|
|
51
54
|
<div class="mx-auto mb-10">
|
|
52
55
|
<div>
|
|
53
56
|
<h1 class="text-3xl font-bold mb-4">Hello!</h1>
|
|
@@ -60,9 +63,9 @@ import inkscape from '@/assets/logos/inkscape.png';
|
|
|
60
63
|
>
|
|
61
64
|
<strong>I’m</strong>
|
|
62
65
|
</a>
|
|
63
|
-
a
|
|
66
|
+
a tech lead based out of Bangalore, India and have worked for startups and enterprises that focus
|
|
64
|
-
|
|
67
|
+
on products in the healthcare and finance domains. I like to build frameworks and automate common
|
|
65
|
-
|
|
68
|
+
tasks to make it easier to develop applications.
|
|
66
69
|
</p>
|
|
67
70
|
<p>
|
|
68
71
|
I enjoy working on open-source projects, and during the last decade, I've created a number
|
src/pages/posts/[...slug].astro
CHANGED
|
@@ -5,71 +5,99 @@ import Layout from '@/layouts/Base.astro';
|
|
|
5
5
|
import FormattedDate from '@/components/FormattedDate.astro';
|
|
6
6
|
|
|
7
7
|
export async function getStaticPaths() {
|
|
8
|
-
const posts = await getCollection('
|
|
8
|
+
const posts = await getCollection('content');
|
|
9
9
|
return posts.map((post) => ({
|
|
10
10
|
params: { slug: post.id },
|
|
11
11
|
props: post,
|
|
12
12
|
}));
|
|
13
13
|
}
|
|
14
|
-
type Props = CollectionEntry<'
|
|
14
|
+
type Props = CollectionEntry<'content'>;
|
|
15
15
|
|
|
16
16
|
const {
|
|
17
|
-
data: { title, description, pubDate,
|
|
17
|
+
data: { title, description, pubDate, heroImage },
|
|
18
18
|
} = Astro.props;
|
|
19
19
|
const { Content } = await render(Astro.props);
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
<Layout>
|
|
23
23
|
<article>
|
|
24
|
-
<
|
|
24
|
+
<div class="hero-image">
|
|
25
25
|
{heroImage && <img width={1020} height={510} src={heroImage} alt="" />}
|
|
26
|
-
</div> -->
|
|
27
|
-
<div class="title">
|
|
28
|
-
<div class="date">
|
|
29
|
-
<FormattedDate date={pubDate} />
|
|
30
|
-
{
|
|
31
|
-
updatedDate && (
|
|
32
|
-
<div class="last-updated-on">
|
|
33
|
-
Last updated on <FormattedDate date={updatedDate} />
|
|
34
|
-
</div>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
</div>
|
|
38
|
-
<h1>{title}</h1>
|
|
39
|
-
<hr />
|
|
40
26
|
</div>
|
|
27
|
+
<h1>{title}</h1>
|
|
28
|
+
<h2>{description}</h2>
|
|
29
|
+
<FormattedDate date={pubDate} />
|
|
30
|
+
<hr />
|
|
41
31
|
<Content />
|
|
42
32
|
</article>
|
|
43
33
|
</Layout>
|
|
44
34
|
<style>
|
|
45
35
|
article {
|
|
36
|
+
h1 {
|
|
37
|
+
text-align: left;
|
|
38
|
+
font-size: 27pt;
|
|
39
|
+
font-weight: bold;
|
|
40
|
+
line-height: 1;
|
|
41
|
+
margin-top: 0.5rem;
|
|
42
|
+
margin-bottom: 0.1rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
time {
|
|
46
|
+
text-align: left;
|
|
47
|
+
color: rgb(var(--gray));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
hr {
|
|
51
|
+
margin: 0.5rem 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
h2 {
|
|
55
|
+
font-weight: 700;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
h3 {
|
|
59
|
+
font-size: 1.3rem;
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
margin-top: 0.5rem;
|
|
62
|
+
margin-bottom: 0.1rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
46
65
|
p {
|
|
47
|
-
padding-bottom:
|
|
66
|
+
padding-bottom: 1rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
p,
|
|
70
|
+
li {
|
|
71
|
+
code {
|
|
72
|
+
color: #d14;
|
|
73
|
+
background-color: var(--color-gray-100);
|
|
74
|
+
word-wrap: break-word;
|
|
75
|
+
box-decoration-break: clone;
|
|
76
|
+
padding: 2px 4px;
|
|
77
|
+
border-radius: 0.2rem;
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
font-size: 0.8rem;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
blockquote {
|
|
84
|
+
font-size: 1.2rem;
|
|
85
|
+
font-weight: 600;
|
|
86
|
+
background: var(--color-accent);
|
|
87
|
+
padding: 0.4rem;
|
|
88
|
+
margin: 16px 0px;
|
|
89
|
+
|
|
90
|
+
p {
|
|
91
|
+
padding: 0;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
pre {
|
|
96
|
+
font-size: 0.8rem;
|
|
97
|
+
font-family: 'monospace';
|
|
98
|
+
line-height: 1.6;
|
|
99
|
+
padding: 16px;
|
|
100
|
+
margin: 12px 0px;
|
|
48
101
|
}
|
|
49
|
-
}
|
|
50
|
-
.hero-image {
|
|
51
|
-
width: 100%;
|
|
52
|
-
}
|
|
53
|
-
.hero-image img {
|
|
54
|
-
display: block;
|
|
55
|
-
margin: 0 auto;
|
|
56
|
-
border-radius: 12px;
|
|
57
|
-
box-shadow: var(--box-shadow);
|
|
58
|
-
}
|
|
59
|
-
.title {
|
|
60
|
-
margin-bottom: 1em;
|
|
61
|
-
padding: 1em 0;
|
|
62
|
-
text-align: center;
|
|
63
|
-
line-height: 1;
|
|
64
|
-
}
|
|
65
|
-
.title h1 {
|
|
66
|
-
margin: 0 0 0.5em 0;
|
|
67
|
-
}
|
|
68
|
-
.date {
|
|
69
|
-
margin-bottom: 0.5em;
|
|
70
|
-
color: rgb(var(--gray));
|
|
71
|
-
}
|
|
72
|
-
.last-updated-on {
|
|
73
|
-
font-style: italic;
|
|
74
102
|
}
|
|
75
103
|
</style>
|
src/pages/posts/index.astro
CHANGED
|
@@ -3,7 +3,7 @@ import { getCollection } from 'astro:content';
|
|
|
3
3
|
import FormattedDate from '../../components/FormattedDate.astro';
|
|
4
4
|
import Layout from '@/layouts/Base.astro';
|
|
5
5
|
|
|
6
|
-
const posts = (await getCollection('
|
|
6
|
+
const posts = (await getCollection('content')).sort(
|
|
7
7
|
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
|
|
8
8
|
);
|
|
9
9
|
---
|
|
@@ -19,18 +19,11 @@ const posts = (await getCollection('blog')).sort(
|
|
|
19
19
|
<a class="text-black underline underline-offset-4" href={`/posts/${post.id}`}>
|
|
20
20
|
{post.data.title}
|
|
21
21
|
</a>
|
|
22
|
-
|
|
22
|
+
<span class="hover:cursor-default">{post.data.description}</span>
|
|
23
23
|
</div>
|
|
24
24
|
<span class="flex flex-1 justify-end sm:ml-4 text-md text-gray-900">
|
|
25
25
|
<FormattedDate date={post.data.pubDate} />
|
|
26
26
|
</span>
|
|
27
|
-
{/* <a href={`/blog/${post.id}/`}>
|
|
28
|
-
<img width={720} height={360} src={post.data.heroImage} alt="" />
|
|
29
|
-
<h4 class="title">{post.data.title}</h4>
|
|
30
|
-
<p class="date">
|
|
31
|
-
<FormattedDate date={post.data.pubDate} />
|
|
32
|
-
</p>
|
|
33
|
-
</a> */}
|
|
34
27
|
</li>
|
|
35
28
|
))
|
|
36
29
|
}
|
src2/app.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import 'tailwindcss';
|
src2/app.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// See https://kit.svelte.dev/docs/types#app
|
|
2
|
-
// for information about these interfaces
|
|
3
|
-
import '@poppanator/sveltekit-svg/dist/svg';
|
|
4
|
-
|
|
5
|
-
declare global {
|
|
6
|
-
namespace App {
|
|
7
|
-
// interface Error {}
|
|
8
|
-
// interface Locals {}
|
|
9
|
-
// interface PageData {}
|
|
10
|
-
// interface PageState {}
|
|
11
|
-
// interface Platform {}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export {};
|
src2/app.html
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
6
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
7
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap"
|
|
8
|
-
rel="stylesheet">
|
|
9
|
-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-L1TPX7RGP2"></script>
|
|
10
|
-
<script>
|
|
11
|
-
window.dataLayer = window.dataLayer || [];
|
|
12
|
-
function gtag() {
|
|
13
|
-
dataLayer.push(arguments);
|
|
14
|
-
}
|
|
15
|
-
gtag('js', new Date());
|
|
16
|
-
gtag('config', 'G-L1TPX7RGP2');
|
|
17
|
-
</script>
|
|
18
|
-
<meta charset="utf-8" />
|
|
19
|
-
<link rel="icon" type="image/png" href="%sveltekit.assets%/favicon.png" />
|
|
20
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
21
|
-
%sveltekit.head%
|
|
22
|
-
</head>
|
|
23
|
-
|
|
24
|
-
<body data-sveltekit-preload-data="hover">
|
|
25
|
-
<div class="contents">%sveltekit.body%</div>
|
|
26
|
-
</body>
|
|
27
|
-
|
|
28
|
-
</html>
|
src2/index.test.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
|
|
3
|
-
describe('sum test', () => {
|
|
4
|
-
it('adds 1 + 2 to equal 3', () => {
|
|
5
|
-
expect(1 + 2).toBe(3);
|
|
6
|
-
});
|
|
7
|
-
});
|
src2/routes/+layout.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const prerender = true;
|
|
2
|
-
export const trailingSlash = 'always';
|
src2/routes/+layout.svelte
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { getStores } from '$app/stores';
|
|
3
|
-
import Footer from '$lib/components/Footer.svelte';
|
|
4
|
-
import Header from '$lib/components/Header.svelte';
|
|
5
|
-
import '../app.css';
|
|
6
|
-
/**
|
|
7
|
-
* @typedef {Object} Props
|
|
8
|
-
* @property {import('svelte').Snippet} [children]
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/** @type {Props} */
|
|
12
|
-
let { children } = $props();
|
|
13
|
-
// let { children } = $props();
|
|
14
|
-
|
|
15
|
-
const { page } = getStores();
|
|
16
|
-
let url = `https://pyrossh.dev${$page.url.pathname}`;
|
|
17
|
-
let isAppPage = $derived($page.url.pathname.includes('only-bible-app'));
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<svelte:head></svelte:head>
|
|
21
|
-
{#if !isAppPage}{:else}
|
|
22
|
-
{@render children?.()}
|
|
23
|
-
{/if}
|
|
24
|
-
|
|
25
|
-
<style lang="postcss">
|
|
26
|
-
:global(html) {
|
|
27
|
-
background-color: white;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:global(body) {
|
|
31
|
-
text-rendering: optimizeLegibility;
|
|
32
|
-
font-family: 'Roboto', sans-serif;
|
|
33
|
-
font-variant-ligatures: common-ligatures;
|
|
34
|
-
font-kerning: normal;
|
|
35
|
-
font-size: 14pt;
|
|
36
|
-
line-height: 1.6;
|
|
37
|
-
color: #222;
|
|
38
|
-
background-color: #fefefe;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:global(html) {
|
|
42
|
-
.roboto-font-400 {
|
|
43
|
-
font-family: 'Roboto', sans-serif;
|
|
44
|
-
font-optical-sizing: auto;
|
|
45
|
-
font-weight: 400;
|
|
46
|
-
font-style: normal;
|
|
47
|
-
font-variation-settings: 'wdth' 100;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.wrapper {
|
|
52
|
-
max-width: calc(95ex - (1em * 2));
|
|
53
|
-
margin-right: auto;
|
|
54
|
-
margin-left: auto;
|
|
55
|
-
padding-left: 1em;
|
|
56
|
-
padding-right: 1em;
|
|
57
|
-
}
|
|
58
|
-
</style>
|
src2/routes/+page.svelte
DELETED
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import Icon from '@iconify/svelte';
|
|
3
|
-
import Slide from '$lib/components/Slide.svelte';
|
|
4
|
-
import onlyBiblePng from '$lib/assets/images/app_icon.png?enhanced';
|
|
5
|
-
import rustPng from '$lib/assets/logos/rust.png?enhanced';
|
|
6
|
-
import pyrosshPng from '$lib/assets/logos/pyrossh.png?enhanced';
|
|
7
|
-
import stats from '$lib/assets/logos/stats.png?enhanced';
|
|
8
|
-
import code from '$lib/assets/logos/code.png?enhanced';
|
|
9
|
-
import helix from '$lib/assets/logos/helix.png?enhanced';
|
|
10
|
-
import nu from '$lib/assets/logos/nu.png?enhanced';
|
|
11
|
-
import iterm from '$lib/assets/logos/iterm.png?enhanced';
|
|
12
|
-
import zellij from '$lib/assets/logos/zellij.png?enhanced';
|
|
13
|
-
import inkscape from '$lib/assets/logos/inkscape.png?enhanced';
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<svelte:head>
|
|
17
|
-
<title>pyrossh</title>
|
|
18
|
-
<meta
|
|
19
|
-
name="description"
|
|
20
|
-
content="A fullstack developer from Bangalore who likes to create frameworks and programming languages."
|
|
21
|
-
/>
|
|
22
|
-
</svelte:head>
|
|
23
|
-
|
|
24
|
-
<div class="mx-auto mb-10">
|
|
25
|
-
<div>
|
|
26
|
-
<h1 class="text-3xl font-bold mb-4">Hello!</h1>
|
|
27
|
-
<p>
|
|
28
|
-
<a
|
|
29
|
-
class="underline"
|
|
30
|
-
href="https://www.linkedin.com/in/pyrossh"
|
|
31
|
-
target="_blank"
|
|
32
|
-
rel="noopener noreferrer"
|
|
33
|
-
>
|
|
34
|
-
<strong>I’m</strong>
|
|
35
|
-
</a>
|
|
36
|
-
a full stack developer based out of Bangalore, India and have worked for startups and enterprises
|
|
37
|
-
that focus on products in the healthcare and finance domains. I like to build frameworks and automate
|
|
38
|
-
common tasks to make it easier to develop applications.
|
|
39
|
-
</p>
|
|
40
|
-
<p>
|
|
41
|
-
I enjoy working on open-source projects, and during the last decade, I've created a number of
|
|
42
|
-
projects that are widely used.
|
|
43
|
-
</p>
|
|
44
|
-
<div>
|
|
45
|
-
<section>
|
|
46
|
-
<div class="flex items-center mb-4">
|
|
47
|
-
<h2>Projects</h2>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-8">
|
|
50
|
-
<Slide title="rust-embed" link="https://git.sr.ht/~pyrossh/rust-embed">
|
|
51
|
-
{#snippet icon()}
|
|
52
|
-
<div>
|
|
53
|
-
<enhanced:img class="mr-2 w-9 rounded-xl" src={rustPng} alt="rust embed" />
|
|
54
|
-
</div>
|
|
55
|
-
{/snippet}
|
|
56
|
-
<p>
|
|
57
|
-
A rust proc-macro which loads files into the rust binary at compile time during
|
|
58
|
-
release and loads the file from the fs during dev
|
|
59
|
-
</p>
|
|
60
|
-
</Slide>
|
|
61
|
-
<Slide title="pyrossh.dev" link="https://git.sr.ht/~pyrossh/website">
|
|
62
|
-
{#snippet icon()}
|
|
63
|
-
<div>
|
|
64
|
-
<enhanced:img class="mr-2 w-9 rounded-xl" src={pyrosshPng} alt="pyrossh website" />
|
|
65
|
-
</div>
|
|
66
|
-
{/snippet}
|
|
67
|
-
<p>
|
|
68
|
-
木 Personal website of pyrossh. Built with
|
|
69
|
-
<span class="*:underline">
|
|
70
|
-
<a href="https://kit.svelte.dev/" target="_blank" rel="noopener noreferrer"
|
|
71
|
-
>sveltekit</a
|
|
72
|
-
>,
|
|
73
|
-
<a href="https://tailwindcss.com/" target="_blank" rel="noopener noreferrer"
|
|
74
|
-
>tailwindcss</a
|
|
75
|
-
>,
|
|
76
|
-
<a href="https://iconify.design/" target="_blank" rel="noopener noreferrer"
|
|
77
|
-
>iconify</a
|
|
78
|
-
>,
|
|
79
|
-
<a href="https://shiki.matsu.io/" target="_blank" rel="noopener noreferrer">shiki</a
|
|
80
|
-
>,
|
|
81
|
-
<a href="https://vitejs.dev/" target="_blank" rel="noopener noreferrer">vite</a>.
|
|
82
|
-
</span>
|
|
83
|
-
</p>
|
|
84
|
-
</Slide>
|
|
85
|
-
<Slide title="pacman" link="https://git.sr.ht/~pyrossh/plum">
|
|
86
|
-
{#snippet icon()}
|
|
87
|
-
<span class="text-4xl mr-2">👾</span>
|
|
88
|
-
{/snippet}
|
|
89
|
-
<p>
|
|
90
|
-
A statically typed, imperative programming language with ADT's inspired by rust,
|
|
91
|
-
haskell.
|
|
92
|
-
</p>
|
|
93
|
-
</Slide>
|
|
94
|
-
<Slide title="Only Bible App" link="/only-bible-app" isExternal={false}>
|
|
95
|
-
{#snippet icon()}
|
|
96
|
-
<div>
|
|
97
|
-
<enhanced:img class="mr-2 w-9 rounded-xl" src={onlyBiblePng} alt="Only Bible App" />
|
|
98
|
-
</div>
|
|
99
|
-
{/snippet}
|
|
100
|
-
<p>
|
|
101
|
-
The only bible app you will ever need. No ads, No in-app purchases, No distractions.
|
|
102
|
-
Works completely offline.
|
|
103
|
-
</p>
|
|
104
|
-
<!-- <p>11 Indian, 12 European, and 8 Asian languages available.</p> -->
|
|
105
|
-
</Slide>
|
|
106
|
-
</div>
|
|
107
|
-
</section>
|
|
108
|
-
|
|
109
|
-
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-8">
|
|
110
|
-
<section>
|
|
111
|
-
<div class="flex items-center">
|
|
112
|
-
<h2>Interests</h2>
|
|
113
|
-
</div>
|
|
114
|
-
<ul class="grid gap-2 grid-cols-3 text-center mt-4 *:bg-slate-100 *:p-1">
|
|
115
|
-
<li>HTML</li>
|
|
116
|
-
<li>CSS</li>
|
|
117
|
-
<li>Javascript</li>
|
|
118
|
-
<li>SQL</li>
|
|
119
|
-
<li>Go</li>
|
|
120
|
-
<li>Zig</li>
|
|
121
|
-
<li>Kotlin</li>
|
|
122
|
-
<li>React</li>
|
|
123
|
-
<li>Expo</li>
|
|
124
|
-
<li>Bun</li>
|
|
125
|
-
<li>MicroZig</li>
|
|
126
|
-
<li>Kaluma</li>
|
|
127
|
-
<li>K8s</li>
|
|
128
|
-
<li>Knative</li>
|
|
129
|
-
<li>Iceberg</li>
|
|
130
|
-
</ul>
|
|
131
|
-
</section>
|
|
132
|
-
<section>
|
|
133
|
-
<div class="flex items-center">
|
|
134
|
-
<h2>Contact</h2>
|
|
135
|
-
</div>
|
|
136
|
-
<ul
|
|
137
|
-
class="grid gap-2 grid-cols-1 text-left mt-4 *:bg-slate-100 *:p-2 *:flex *:flex-col *:items-baseline *:sm:flex-row"
|
|
138
|
-
>
|
|
139
|
-
<li>
|
|
140
|
-
<strong class="mr-2">Email:</strong>
|
|
141
|
-
<span>pyros2097@gmail.com</span>
|
|
142
|
-
</li>
|
|
143
|
-
<li>
|
|
144
|
-
<strong class="mr-2">Sourcehut:</strong>
|
|
145
|
-
<a class="text-blue-900" href="https://git.sr.ht/~pyrossh/">
|
|
146
|
-
https://git.sr.ht/~pyrossh/
|
|
147
|
-
</a>
|
|
148
|
-
</li>
|
|
149
|
-
<li>
|
|
150
|
-
<strong class="mr-2">LinkedIn:</strong>
|
|
151
|
-
<a class="text-blue-900" href="https://www.linkedin.com/in/peter-john-in">
|
|
152
|
-
https://www.linkedin.com/in/pyrossh
|
|
153
|
-
</a>
|
|
154
|
-
</li>
|
|
155
|
-
</ul>
|
|
156
|
-
</section>
|
|
157
|
-
</div>
|
|
158
|
-
<section>
|
|
159
|
-
<div class="flex items-center">
|
|
160
|
-
<h2>Tools</h2>
|
|
161
|
-
</div>
|
|
162
|
-
<ul class="grid gap-2 grid-cols-3 md:grid-cols-7 text-center mt-4 *:bg-slate-100 *:p-1">
|
|
163
|
-
<li>
|
|
164
|
-
<a
|
|
165
|
-
class="soft-link"
|
|
166
|
-
href="https://github.com/exelban/stats"
|
|
167
|
-
target="_blank"
|
|
168
|
-
rel="noopener noreferrer"
|
|
169
|
-
>
|
|
170
|
-
<div>Stats</div>
|
|
171
|
-
<enhanced:img class="soft-icon" src={stats} alt="Stats" />
|
|
172
|
-
</a>
|
|
173
|
-
</li>
|
|
174
|
-
<li>
|
|
175
|
-
<a
|
|
176
|
-
class="soft-link"
|
|
177
|
-
href="https://github.com/microsoft/vscode"
|
|
178
|
-
target="_blank"
|
|
179
|
-
rel="noopener noreferrer"
|
|
180
|
-
>
|
|
181
|
-
<div>VS Code</div>
|
|
182
|
-
<enhanced:img class="soft-icon" src={code} alt="VsCode" />
|
|
183
|
-
</a>
|
|
184
|
-
</li>
|
|
185
|
-
<li>
|
|
186
|
-
<a
|
|
187
|
-
class="soft-link"
|
|
188
|
-
href="https://github.com/helix-editor/helix"
|
|
189
|
-
target="_blank"
|
|
190
|
-
rel="noopener noreferrer"
|
|
191
|
-
>
|
|
192
|
-
<div>Helix</div>
|
|
193
|
-
<enhanced:img class="soft-icon" src={helix} alt="Helix" />
|
|
194
|
-
</a>
|
|
195
|
-
</li>
|
|
196
|
-
<li>
|
|
197
|
-
<a
|
|
198
|
-
class="soft-link"
|
|
199
|
-
href="https://github.com/nushell/nushell"
|
|
200
|
-
target="_blank"
|
|
201
|
-
rel="noopener noreferrer"
|
|
202
|
-
>
|
|
203
|
-
<div>Nushell</div>
|
|
204
|
-
<enhanced:img class="w-7 p-0.5 rounded-md" src={nu} alt="nu-shell" />
|
|
205
|
-
</a>
|
|
206
|
-
</li>
|
|
207
|
-
<li>
|
|
208
|
-
<a
|
|
209
|
-
class="soft-link"
|
|
210
|
-
href="https://github.com/gnachman/iTerm2"
|
|
211
|
-
target="_blank"
|
|
212
|
-
rel="noopener noreferrer"
|
|
213
|
-
>
|
|
214
|
-
<div>iTerm2</div>
|
|
215
|
-
<enhanced:img class="soft-icon" src={iterm} alt="iterm2" />
|
|
216
|
-
</a>
|
|
217
|
-
</li>
|
|
218
|
-
<li>
|
|
219
|
-
<a
|
|
220
|
-
class="soft-link"
|
|
221
|
-
href="https://zellij.dev/"
|
|
222
|
-
target="_blank"
|
|
223
|
-
rel="noopener noreferrer"
|
|
224
|
-
>
|
|
225
|
-
<div>Zellij</div>
|
|
226
|
-
<enhanced:img class="w-7 p-0.5" src={zellij} alt="zellij" />
|
|
227
|
-
</a>
|
|
228
|
-
</li>
|
|
229
|
-
|
|
230
|
-
<li>
|
|
231
|
-
<a
|
|
232
|
-
class="soft-link"
|
|
233
|
-
href="https://inkscape.org/"
|
|
234
|
-
target="_blank"
|
|
235
|
-
rel="noopener noreferrer"
|
|
236
|
-
>
|
|
237
|
-
<div>Inkscape</div>
|
|
238
|
-
<enhanced:img class="soft-icon" src={inkscape} alt="inkscape" />
|
|
239
|
-
</a>
|
|
240
|
-
</li>
|
|
241
|
-
</ul>
|
|
242
|
-
</section>
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
</div>
|
src2/routes/cv/+page.svelte
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svelte:head>
|
|
2
|
-
<title>pyrossh | cv</title>
|
|
3
|
-
<meta name="description" content="Peter John's CV" />
|
|
4
|
-
</svelte:head>
|
src2/routes/posts/+page.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const load = async ({ params }) => {
|
|
2
|
-
const paths = import.meta.glob('/src/posts/*.md', { eager: true });
|
|
3
|
-
const posts = Object.keys(paths)
|
|
4
|
-
.map((key) => ({ ...paths[key].metadata, slug: key.split('/').at(-1).replace('.md', '') }))
|
|
5
|
-
.sort((first, second) => new Date(second.date).getTime() - new Date(first.date).getTime());
|
|
6
|
-
return { posts };
|
|
7
|
-
};
|
src2/routes/posts/+page.svelte
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { formatDate } from '$lib/dateUtils';
|
|
3
|
-
let { data } = $props();
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<svelte:head>
|
|
7
|
-
<title>pyrossh | posts</title>
|
|
8
|
-
<meta name="description" content="Peter John's Posts" />
|
|
9
|
-
</svelte:head>
|
|
10
|
-
<div>
|
|
11
|
-
<h1 class="font-bold text-3xl">Posts</h1>
|
|
12
|
-
<ul class="flex flex-col">
|
|
13
|
-
{#each data.posts as { title, description, image, date, slug, tags }}
|
|
14
|
-
<li class="grid grid-cols-1 sm:grid-cols-2 gap-3 justify-start items-end mt-5 leading-6">
|
|
15
|
-
<div class="flex flex-col">
|
|
16
|
-
<a class="text-black underline underline-offset-4" href={`/posts/${slug}`}>
|
|
17
|
-
{title}
|
|
18
|
-
</a>
|
|
19
|
-
<span class="hover:cursor-default">{description}</span>
|
|
20
|
-
</div>
|
|
21
|
-
<span class="flex flex-1 justify-end sm:ml-4 text-md text-gray-900">{formatDate(date)}</span
|
|
22
|
-
>
|
|
23
|
-
</li>
|
|
24
|
-
{/each}
|
|
25
|
-
</ul>
|
|
26
|
-
</div>
|
src2/routes/posts/[slug]/+page.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { error } from '@sveltejs/kit';
|
|
2
|
-
|
|
3
|
-
export async function load({ params }) {
|
|
4
|
-
try {
|
|
5
|
-
const post = await import(`../../../posts/${params.slug}.md`);
|
|
6
|
-
return {
|
|
7
|
-
content: post.default,
|
|
8
|
-
meta: post.metadata,
|
|
9
|
-
};
|
|
10
|
-
} catch (e) {
|
|
11
|
-
error(404, `Could not find ${params.slug}`);
|
|
12
|
-
}
|
|
13
|
-
}
|
src2/routes/posts/[slug]/+page.svelte
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { formatDateLong } from '$lib/dateUtils';
|
|
3
|
-
let { data } = $props();
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<svelte:head>
|
|
7
|
-
<title>pyrossh | {data.meta.title}</title>
|
|
8
|
-
<meta name="description" content={data.meta.description} />
|
|
9
|
-
<meta name="keywords" content={data.meta.tags} />
|
|
10
|
-
<meta property="og:type" content="article" />
|
|
11
|
-
<meta property="og:title" content={data.meta.title} />
|
|
12
|
-
</svelte:head>
|
|
13
|
-
|
|
14
|
-
<article class="flex flex-col w-full">
|
|
15
|
-
<hgroup class="flex flex-1 flex-col mb-6">
|
|
16
|
-
<h1>
|
|
17
|
-
{data.meta.title}
|
|
18
|
-
</h1>
|
|
19
|
-
<div class="mt-4 text-gray-600">
|
|
20
|
-
{formatDateLong(data.meta.date)}
|
|
21
|
-
</div>
|
|
22
|
-
</hgroup>
|
|
23
|
-
<div class="content">
|
|
24
|
-
<data.content />
|
|
25
|
-
</div>
|
|
26
|
-
</article>
|
|
27
|
-
|
|
28
|
-
<style>
|
|
29
|
-
h1 {
|
|
30
|
-
font-size: 27pt;
|
|
31
|
-
font-weight: bold;
|
|
32
|
-
text-align: left;
|
|
33
|
-
line-height: 1;
|
|
34
|
-
margin-top: 1rem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.content :global {
|
|
38
|
-
h2 {
|
|
39
|
-
font-weight: 700;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
h3 {
|
|
43
|
-
font-size: 1.5rem;
|
|
44
|
-
font-weight: 700;
|
|
45
|
-
color: black;
|
|
46
|
-
margin: 24px 0px 12px 0px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
blockquote {
|
|
50
|
-
font-size: 1.2rem;
|
|
51
|
-
font-weight: 600;
|
|
52
|
-
font-style: normal;
|
|
53
|
-
background: #f8ffaa;
|
|
54
|
-
padding: 0.4rem;
|
|
55
|
-
margin: 16px 0px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
pre {
|
|
59
|
-
font-size: 0.8rem;
|
|
60
|
-
font-family: 'monospace';
|
|
61
|
-
line-height: 1.6;
|
|
62
|
-
padding: 16px;
|
|
63
|
-
border-radius: 16px;
|
|
64
|
-
margin: 12px 0px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
code {
|
|
68
|
-
color: #d14;
|
|
69
|
-
word-wrap: break-word;
|
|
70
|
-
box-decoration-break: clone;
|
|
71
|
-
padding: 2px 4px;
|
|
72
|
-
border-radius: 0.2rem;
|
|
73
|
-
font-weight: 400;
|
|
74
|
-
font-size: 0.8rem;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
</style>
|
src2/routes/sitemap.xml/+server.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as sitemap from 'super-sitemap';
|
|
2
|
-
|
|
3
|
-
export const prerender = true;
|
|
4
|
-
|
|
5
|
-
export async function GET() {
|
|
6
|
-
return await sitemap.response({
|
|
7
|
-
origin: 'https://pyrossh.dev',
|
|
8
|
-
paramValues: {
|
|
9
|
-
'/posts/[slug]': ['eyecandy-golang-error-reporting', 'gopibot-to-the-rescue'],
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
}
|
src2/vite-env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
svelte.config.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import adapter from '@sveltejs/adapter-static';
|
|
2
|
-
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
3
|
-
import { mdsvex, escapeSvelte } from 'mdsvex';
|
|
4
|
-
import github from 'remark-github';
|
|
5
|
-
import { getSingletonHighlighter } from 'shiki';
|
|
6
|
-
|
|
7
|
-
/** @type {import('mdsvex').MdsvexOptions} */
|
|
8
|
-
const mdsvexOptions = {
|
|
9
|
-
extensions: ['.md'],
|
|
10
|
-
remarkPlugins: [
|
|
11
|
-
[
|
|
12
|
-
github,
|
|
13
|
-
{
|
|
14
|
-
repository: 'https://github.com/pyrossh/pyrossh.dev',
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
],
|
|
18
|
-
highlight: {
|
|
19
|
-
highlighter: async (code, lang = 'text') => {
|
|
20
|
-
const highlighter = await getSingletonHighlighter({
|
|
21
|
-
themes: ['dracula'],
|
|
22
|
-
langs: ['javascript', 'typescript', 'go', 'shell', 'tsx'],
|
|
23
|
-
});
|
|
24
|
-
await highlighter.loadLanguage('javascript', 'typescript', 'go');
|
|
25
|
-
const html = escapeSvelte(highlighter.codeToHtml(code, { lang, theme: 'dracula' }));
|
|
26
|
-
return `{@html \`${html}\` }`;
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @type {import('@sveltejs/kit').Config} */
|
|
32
|
-
const config = {
|
|
33
|
-
extensions: ['.svelte', '.md'],
|
|
34
|
-
preprocess: [vitePreprocess(), mdsvex(mdsvexOptions)],
|
|
35
|
-
kit: {
|
|
36
|
-
adapter: adapter({
|
|
37
|
-
strict: true,
|
|
38
|
-
fallback: '404.html',
|
|
39
|
-
}),
|
|
40
|
-
},
|
|
41
|
-
vitePlugin: {
|
|
42
|
-
inspector: {
|
|
43
|
-
toggleKeyCombo: 'meta-shift',
|
|
44
|
-
showToggleButton: 'always',
|
|
45
|
-
toggleButtonPos: 'bottom-right',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default config;
|
vite.config.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { enhancedImages } from '@sveltejs/enhanced-img';
|
|
2
|
-
import { sveltekit } from '@sveltejs/kit/vite';
|
|
3
|
-
import tailwindcss from '@tailwindcss/vite';
|
|
4
|
-
import svg from '@poppanator/sveltekit-svg';
|
|
5
|
-
import { defineConfig } from 'vitest/config';
|
|
6
|
-
|
|
7
|
-
export default defineConfig({
|
|
8
|
-
plugins: [tailwindcss(), enhancedImages(), sveltekit(), svg()],
|
|
9
|
-
test: {
|
|
10
|
-
include: ['src/**/*.{test,spec}.{js,ts}'],
|
|
11
|
-
},
|
|
12
|
-
});
|