~repos /website

#astro#js#html#css

git clone https://pyrossh.dev/repos/website.git

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


64283618 pyrossh

6 months ago
update app
astro.config.mjs CHANGED
@@ -6,6 +6,8 @@ import sitemap from '@astrojs/sitemap';
6
6
  // https://astro.build/config
7
7
  export default defineConfig({
8
8
  site: 'https://pyrossh.dev',
9
+ trailingSlash: 'never',
10
+ output: 'static',
9
11
  integrations: [
10
12
  mdx(),
11
13
  sitemap(),
@@ -17,4 +19,4 @@ export default defineConfig({
17
19
  cssVariable: "--font-roboto"
18
20
  }]
19
21
  },
20
- });
22
+ });
bun.lock CHANGED
@@ -829,6 +829,8 @@
829
829
 
830
830
  "xxhash-wasm": ["xxhash-wasm@1.1.0", "", {}, "sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA=="],
831
831
 
832
+ "yaml": ["yaml@1.10.2", "", {}, "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="],
833
+
832
834
  "yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
833
835
 
834
836
  "yocto-queue": ["yocto-queue@1.2.1", "", {}, "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg=="],
deploy.sh ADDED
@@ -0,0 +1,5 @@
1
+ rm -rf dist
2
+ bun run build
3
+ aws s3 sync --delete ./dist/ s3://pyrossh-website
4
+ aws cloudfront create-invalidation --distribution-id E2KFT51L97LWA1 --paths "/*"
5
+ cd infra && terraform apply -auto-approve
package.json CHANGED
@@ -4,8 +4,7 @@
4
4
  "version": "0.0.1",
5
5
  "scripts": {
6
6
  "dev": "astro dev",
7
- "build": "astro build",
7
+ "build": "astro build"
8
- "publish": "rm -rf build && bun run build && tar -C dist -cvz . > site.tar.gz && hut pages publish -d pyrossh.dev site.tar.gz && rm site.tar.gz"
9
8
  },
10
9
  "dependencies": {
11
10
  "@appzic/astro-reset-css": "^1.2.0",
src/consts.ts CHANGED
@@ -1,3 +1,13 @@
1
+ import statsPng from "@/assets/logos/stats.png";
2
+ import voidPng from "@/assets/logos/void.png";
3
+ import helixPng from "@/assets/logos/helix.png";
4
+ import nuPng from "@/assets/logos/nu.png";
5
+ import ghosttyPng from "@/assets/logos/ghostty.png";
6
+ import zellijPng from "@/assets/logos/zellij.png";
7
+ import zenSvg from "@/assets/logos/zen.svg";
8
+ import brunoPng from "@/assets/logos/bruno.png";
9
+ // import hyectorPng from "@/assets/logos/hyvector.png";
10
+
1
11
  export const SITE_TITLE = 'pyrossh';
2
12
  export const SITE_DESCRIPTION = 'Welcome to my website!';
3
13
  export const REPOS = [
@@ -62,42 +72,42 @@ export const TOOLS = [
62
72
  {
63
73
  name: "Stats",
64
74
  link: "https://github.com/exelban/stats",
65
- image: import("@/assets/logos/stats.png"),
75
+ image: statsPng,
66
76
  },
67
77
  {
68
78
  name: "Void",
69
79
  link: "https://github.com/voideditor/void",
70
- image: import("@/assets/logos/void.png"),
80
+ image: voidPng,
71
81
  },
72
82
  {
73
83
  name: "Helix",
74
84
  link: "https://github.com/helix-editor/helix",
75
- image: import("@/assets/logos/helix.png"),
85
+ image: helixPng,
76
86
  },
77
87
  {
78
88
  name: "Nushell",
79
89
  link: "https://github.com/nushell/nushell",
80
- image: import("@/assets/logos/nu.png"),
90
+ image: nuPng,
81
91
  },
82
92
  {
83
93
  name: "Ghostty",
84
94
  link: "https://github.com/ghostty-org/ghostty",
85
- image: import("@/assets/logos/ghostty.png"),
95
+ image: ghosttyPng,
86
96
  },
87
97
  {
88
98
  name: "Zellij",
89
99
  link: "https://zellij.dev/",
90
- image: import("@/assets/logos/zellij.png"),
100
+ image: zellijPng,
91
101
  },
92
102
  {
93
103
  name: "Zen",
94
104
  link: "https://github.com/zen-browser/desktop",
95
- image: import("@/assets/logos/zen.svg"),
105
+ image: zenSvg,
96
106
  },
97
107
  {
98
108
  name: "Bruno",
99
109
  link: "https://github.com/usebruno/bruno",
100
- image: import("@/assets/logos/bruno.png"),
110
+ image: brunoPng,
101
111
  },
102
112
  {
103
113
  name: "Secretive",
src/containers/Log.astro DELETED
@@ -1,14 +0,0 @@
1
- ---
2
- import { simpleGit } from "simple-git";
3
- const res = await simpleGit().log();
4
- ---
5
-
6
- {
7
- res.all.map((commit) => (
8
- <div>
9
- <h4>{commit.hash}</h4>
10
- <p>{commit.message}</p>
11
- <span>{commit.date}</span>
12
- </div>
13
- ))
14
- }
src/content.config.ts CHANGED
@@ -10,7 +10,7 @@ export const collections = {
10
10
  name: "loader",
11
11
  load: async (ctx) => {
12
12
  for (const r of REPOS) {
13
- const repoPath = process.cwd() + "/../" + r.title;
13
+ const repoPath = `/Users/pyrossh/Code/pyrossh/${r.title}`;
14
14
  const readmePath = repoPath + "/README.md";
15
15
  console.log("loading repo " + repoPath)
16
16
  const git = simpleGit(repoPath)
@@ -35,7 +35,7 @@ export const collections = {
35
35
  tags: tags,
36
36
  },
37
37
  rendered: {
38
- html: fs.existsSync(readmePath) ? await (await import(/* @vite-ignore */readmePath)).compiledContent() : "",
38
+ html: '', // fs.existsSync(readmePath) ? await (await import(readmePath)).compiledContent() : "",
39
39
  }
40
40
  });
41
41
  }
src/layouts/Base.astro CHANGED
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import { ClientRouter } from "astro:transitions";
2
3
  import { Font } from "astro:assets";
3
4
  import ResetCSS from "@appzic/astro-reset-css";
4
5
  import Header from "@/components/Header.astro";
@@ -55,8 +56,14 @@ const image = "/favicon.png";
55
56
  <meta property="twitter:image" content={new URL(image, Astro.url)} />
56
57
  <Font cssVariable="--font-roboto" preload />
57
58
  <ResetCSS />
59
+ <ClientRouter />
58
60
  </head>
59
61
  <body>
62
+ <style>
63
+ @view-transition {
64
+ navigation: auto; /* enabled! */
65
+ }
66
+ </style>
60
67
  <Header />
61
68
  <Wrapper>
62
69
  <main class:list={classname}>
src/pages/404.astro ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ import Layout from "@/layouts/Base.astro";
3
+ ---
4
+
5
+ <Layout title="pyrossh" description="Page Not found">
6
+ <h1>404 - Page not found</h1>
7
+ </Layout>
src/pages/500.astro ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ import Layout from "@/layouts/Base.astro";
3
+ ---
4
+
5
+ <Layout title="pyrossh" description="Error Page">
6
+ <h1>500 - Something went wrong</h1>
7
+ </Layout>
src/pages/repos/[...slug]/branches/index.astro DELETED
@@ -1,21 +0,0 @@
1
- ---
2
- import { type CollectionEntry, getCollection } from "astro:content";
3
- import Layout from "@/layouts/Base.astro";
4
- import Commit from "@/components/Commit.astro";
5
-
6
- export async function getStaticPaths() {
7
- const repos = await getCollection("repos");
8
- return repos.map((repo) => ({
9
- params: { slug: repo.id },
10
- props: repo,
11
- }));
12
- }
13
- type Props = CollectionEntry<"repos">;
14
- const {
15
- data: { title, description, branches },
16
- } = Astro.props;
17
- ---
18
-
19
- <Layout title={title} description={description}>
20
- {branches.map((branch) => <Commit {...branch} />)}
21
- </Layout>