Compare commits

...

21 commits
v1.1.0 ... main

Author SHA1 Message Date
Ayo
3b5bf08541 feat: hide now link (for now) 2025-09-15 09:09:56 +02:00
Ayo
a8b77eca65 feat: update link sr.ht 2025-09-07 10:22:52 +02:00
Ayo
e79a6b29fc feat: add simple-tts in showcase 2025-09-05 14:11:15 +02:00
Ayo
29a29e4d63 chore(sw): update jsdoc 2025-08-26 01:23:30 +02:00
Ayo
343568042c refactor(sw): check for fallbackUrl 2025-08-26 00:53:34 +02:00
Ayo
f80807eebd chore(sw): add jsdoc 2025-08-26 00:47:00 +02:00
Ayo
f755588f58 chore: formatting 2025-08-26 00:25:55 +02:00
Ayo
410f43166c feat(sw): warn if failed to delete old cache 2025-08-26 00:20:08 +02:00
Ayo
0d0b9d44eb 1.3.0 2025-08-19 16:32:42 +02:00
Ayo
17e33c9659 feat(footer): show more social links; add forgejo 2025-08-19 16:28:03 +02:00
Ayo
e37836dd07 1.2.0 2025-08-02 11:02:59 +02:00
Ayo
3f13ac28c4 a11y: increase contrast ratio of link colors in dark mode 2025-08-02 11:02:21 +02:00
Ayo
f17673a404 chore: update deps & package manager 2025-08-02 10:50:42 +02:00
Ayo
02806a1563 chore: update lock files 2025-07-29 15:36:49 +02:00
Ayo
1e1e4d6d4a feat: use yolk.ayo.run for masto link 2025-07-28 13:21:49 +02:00
Ayo
516e9c459a Merge branch 'main' of git.sr.ht:~ayoayco/ayco.io-astro 2025-07-28 13:14:04 +02:00
Ayo
079deaab41 feat: use main.elk.zone for masto link 2025-07-28 13:13:58 +02:00
a30afc3f3d Merge branch 'main' of git@git.sr.ht:~ayoayco/ayco.io-astro 2025-07-22 09:19:29 +02:00
cb373e49fd chore: update readme 2025-07-22 09:19:14 +02:00
Ayo
03bd251103 1.1.1 2025-07-11 19:35:12 +02:00
Ayo
84e2c77078 feat(footer): link to source 2025-07-11 19:35:05 +02:00
11 changed files with 4837 additions and 17127 deletions

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
dist/
.output/
.astro/
.continue/
# dependencies
node_modules/

View file

@ -29,9 +29,13 @@ $ pnpm i
| `pnpm run deploy` | upload to my server |
| `pnpm run prep:now` | back up and clear current `now page` constants |
> For the deploy script, you need to add an environmental variable named HOST
## Deployment
For the script `npm run deploy`, you need to add an environmental variable named HOST containing the IP address of the host server. This will scp the build files into the server.
If you want to run build before deploying, do `npm run build:deploy`
-----
> Just keep building.
> ~Ayo
*Just keep building.*<br />
*~Ayo*

13094
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{
"name": "@ayco/personal-website",
"type": "module",
"version": "1.1.0",
"version": "1.3.0",
"private": true,
"scripts": {
"astro": "astro",
@ -22,25 +22,25 @@
"devDependencies": {
"@astro-reactive/form": "^0.10.1",
"@astro-reactive/validator": "^0.5.1",
"@astrojs/sitemap": "^3.4.1",
"@astrojs/sitemap": "^3.4.2",
"@ayco/astro-sw": "^0.8.14",
"@eslint/compat": "^1.3.1",
"@eslint/js": "^9.30.1",
"@eslint/js": "^9.32.0",
"@iconify-json/mdi": "^1.2.3",
"@iconify-json/simple-icons": "^1.2.42",
"@iconify-json/tabler": "^1.2.19",
"@typescript-eslint/parser": "^8.36.0",
"astro": "^5.11.0",
"@iconify-json/simple-icons": "^1.2.45",
"@iconify-json/tabler": "^1.2.20",
"@typescript-eslint/parser": "^8.38.0",
"astro": "^5.12.8",
"astro-eslint-parser": "^1.2.2",
"astro-github-stats": "^0.8.0",
"astro-icon": "^1.1.5",
"consola": "^3.4.2",
"eslint": "^9.30.1",
"eslint": "^9.32.0",
"eslint-plugin-astro": "^1.3.1",
"eslint-plugin-jsx-a11y": "^6.10.2",
"globals": "^16.3.0",
"husky": "^9.1.7",
"jiti": "^2.4.2",
"jiti": "^2.5.1",
"lint-staged": "^16.1.2",
"pathe": "^2.0.3",
"prettier": "^3.6.2",
@ -49,8 +49,8 @@
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.2",
"tslib": "^2.8.1",
"typescript": "^5.8.3",
"typescript-eslint": "^8.36.0",
"typescript": "^5.9.2",
"typescript-eslint": "^8.38.0",
"unified": "^11.0.5"
},
"lint-staged": {
@ -62,5 +62,5 @@
"prettier --write"
]
},
"packageManager": "pnpm@7.28.0+sha1.48be3292711ad554fe944f6caaf9b0f5477524fe"
"packageManager": "pnpm@10.14.0"
}

File diff suppressed because it is too large Load diff

View file

@ -32,8 +32,8 @@ const year = new Date().getFullYear()
aria-label={linkObj.text}
>
<Icon
width="1.5em"
height="1.5em"
width="1em"
height="1em"
name={`${linkObj.set ?? 'simple-icons'}:${linkObj.icon}`}
/>
</a>
@ -47,7 +47,9 @@ const year = new Date().getFullYear()
<a href="/">Ayo Ayco</a>. This website <a
href="https://ayos.blog/stopped-tracking-on-my-sites"
>does not track users</a
>.
>. See the <a href="https://git.sr.ht/~ayoayco/ayco.io-astro"
>source code.</a
>
</p>
<WebRings />

View file

@ -40,11 +40,21 @@ export const links: Link[] = [
export default links
export const footerLinks: Link[] = [
{
text: "Ayo's Forge",
url: 'https://git.ayo.run/ayo/',
icon: 'git',
},
{
text: 'SourceHut',
url: 'https://ayco.io/sh/',
url: 'https://sr.ht/~ayoayco',
icon: 'sourcehut',
},
{
text: 'GitHub',
url: 'https://ayco.io/gh',
icon: 'github',
},
{
text: 'Mastodon',
url: 'https://social.ayco.io/public/local',
@ -56,9 +66,14 @@ export const footerLinks: Link[] = [
icon: 'pixelfed',
},
{
text: 'GitHub',
url: 'https://ayco.io/gh',
icon: 'github',
text: 'Bluesky',
url: 'http://bsky.app/profile/ayco.io',
icon: 'bluesky',
},
{
text: 'LinkedIn',
url: 'https://www.linkedin.com/in/ayoayco/',
icon: 'linkedin',
},
]

View file

@ -103,7 +103,7 @@ const { title, description, ogImage } = Astro.props
@media (prefers-color-scheme: dark) {
a {
color: var(--color-brand-blue-3);
color: var(--text-color-light);
}
}
</style>

View file

@ -2,7 +2,7 @@
import Layout from '../layouts/Layout.astro'
import Card from '../components/Card.astro'
import Footer from '../components/Footer.astro'
import now from '../constants/now.json'
// import now from '../constants/now.json'
---
<Layout>
@ -29,11 +29,11 @@ import now from '../constants/now.json'
<h1 title="Ayo Ayco | Software Engineer + Web Developer">
Hi, I'm <span class="heavy-text">Ayo</span>!
</h1>
<!-- <a href="https://forms.ayo.run/form/tnz7FybY" class="now-wrapper"> -->
<a href="/now" class="now-wrapper">
<!--a href="https://forms.ayo.run/form/tnz7FybY" class="now-wrapper"-->
<!--a href="/now" class="now-wrapper">
<span class="now-label">now</span>
<span class="status">{now.title}</span>
</a>
</a-->
</div>
</div>
</section>

View file

@ -16,6 +16,12 @@ import Card from '../components/Card.astro'
>.
</p>
<ul>
<Card
newTab
href="https://git.ayo.run/ayo/simple-tts#readme"
title="Simple TTS"
body="A simple machine learning text-to-speech program for the terminal"
/>
<Card
newTab
href="https://mcfly.js.org"

View file

@ -6,17 +6,39 @@
const cacheName = `${__prefix ?? 'app'}-v${__version ?? '000'}`
const forceLogging = true
/**
* Cleans up old service worker caches by deleting any cache that doesn't match the current cache name.
* This ensures only the current version of the application's cache is retained.
* @async
* @function cleanOldCaches
* @returns {Promise<void>} A promise that resolves when old caches have been deleted
*/
const cleanOldCaches = async () => {
const allowCacheNames = [cacheName]
const allCaches = await caches.keys()
allCaches.forEach((key) => {
if (!allowCacheNames.includes(key)) {
console.info('Deleting old cache', key)
caches.delete(key)
caches
.delete(key)
.then(() => {
console.info('Successfully deleted cache:', key)
})
.catch((error) => {
console.warn('Failed to delete old cache:', key, error)
})
}
})
}
/**
* Adds specified resources to the service worker cache.
* This function is used to cache static assets for offline access.
* @async
* @function addResourcesToCache
* @param {Array<string>} resources - An array of URLs representing the resources to be cached.
* @returns {Promise<void>} A promise that resolves when all resources have been successfully added to the cache.
*/
const addResourcesToCache = async (resources) => {
const cache = await caches.open(cacheName)
console.info('adding resources to cache...', {
@ -34,6 +56,14 @@ const addResourcesToCache = async (resources) => {
}
}
/**
* Puts a response in the cache.
* @async
* @function putInCache
* @param {Request} request - The request to be cached.
* @param {Response} response - The response to be cached.
* @returns {Promise<void>} A promise that resolves when the response has been added to the cache.
*/
const putInCache = async (request, response) => {
const cache = await caches.open(cacheName)
@ -49,9 +79,6 @@ const networkFirst = async ({ request, fallbackUrl }) => {
try {
// Try to get the resource from the network for 5 seconds
const responseFromNetwork = await fetch(request.clone())
// response may be used only once
// we need to save clone to put one copy in cache
// and serve second one
putInCache(request, responseFromNetwork.clone())
console.info('using network response', responseFromNetwork.url)
return responseFromNetwork
@ -64,11 +91,13 @@ const networkFirst = async ({ request, fallbackUrl }) => {
return responseFromCache
}
// Try the fallback
const fallbackResponse = await cache.match(fallbackUrl)
if (fallbackResponse) {
console.info('using fallback cached response...', fallbackResponse.url)
return fallbackResponse
// If fallback is provided, try to use it, otherwise return error
if (fallbackUrl) {
const fallbackResponse = await cache.match(fallbackUrl)
if (fallbackResponse) {
console.info('using fallback cached response...', fallbackResponse.url)
return fallbackResponse
}
}
// when even the fallback response is not available,