Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ defineOgImage('Default')
</script>

<template>
<VitePwaManifest />
<NuxtRouteAnnouncer />
<NuxtLayout>
<NuxtPage />
Expand Down
25 changes: 25 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const TITLE = 'COSCUP x UbuCon Asia 2026'
const TITLE_ZH = '開源人年會 x UbuCon Asia 2026'
const DESC = 'Conference for Open Source Coders, Users, and Promoters is a free annual conference providing a platform to connect FLOSS folks across Asia since 2006. It\'s a major force of free software movement advocacy in Taiwan.'
const URL = `https://coscup.org/${YEAR}`
const THEME_COLOR = '#2ac173'

const EVENT_COMMON = {
startDate: '2026-08-08T09:00:00+08:00',
Expand Down Expand Up @@ -45,9 +46,11 @@ export default defineNuxtConfig({
titleTemplate: `%s | ${TITLE}`,
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/2026/favicon.svg' },
{ rel: 'apple-touch-icon', href: '/2026/pwa-apple-touch.png' },
],
meta: [
{ name: 'description', content: DESC },
{ name: 'theme-color', content: THEME_COLOR },
{ property: 'og:title', content: TITLE },
{ property: 'og:description', content: DESC },
{ property: 'og:site_name', content: TITLE },
Expand Down Expand Up @@ -136,6 +139,7 @@ export default defineNuxtConfig({
'@nuxtjs/i18n',
'nuxt-gtag',
'nuxt-og-image',
'@vite-pwa/nuxt',
],

// Origin only — app.baseURL ('/2026') is appended automatically by nuxt-site-config.
Expand Down Expand Up @@ -185,6 +189,27 @@ export default defineNuxtConfig({
detectBrowserLanguage: false, // https://github.com/nuxt-modules/i18n/issues/3262
},

pwa: {
registerType: 'autoUpdate',
Comment on lines +192 to +193

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the slash in the PWA base path

With this PWA block relying on @vite-pwa/nuxt defaults, the module takes the current app.baseURL (/2026) as its base/scope and vite-plugin-pwa concatenates that with manifest.webmanifest and sw.js. On the GitHub Pages deployment this emits links like /2026manifest.webmanifest and registers /2026sw.js instead of /2026/manifest.webmanifest and /2026/sw.js, so the new manifest/service worker 404 and the site is not installable. Set the PWA base/buildBase/scope (or the app base URL) to the slash-terminated /2026/.

Useful? React with 👍 / 👎.

manifest: {
name: TITLE,
short_name: 'COSCUP 2026',
description: DESC,
lang: 'zh-Hant-TW',
theme_color: THEME_COLOR,
background_color: THEME_COLOR,
display: 'standalone',
icons: [
{ src: 'pwa-192.png', sizes: '192x192', type: 'image/png' },
{ src: 'pwa-512.png', sizes: '512x512', type: 'image/png' },
{ src: 'pwa-512-markable.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
],
},
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,webp,woff2}'],
},
},

runtimeConfig: {
pretalxApiToken: '',
pretalxApiUrl: '',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@unocss/nuxt": "66.7.3",
"@unocss/preset-wind4": "66.7.3",
"@unocss/transformer-directives": "66.7.3",
"@vite-pwa/nuxt": "1.1.1",
"cross-env": "10.1.0",
"eslint-plugin-format": "2.0.1",
"nuxt-og-image": "6.5.2",
Expand Down
2,599 changes: 2,453 additions & 146 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Binary file added public/pwa-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/pwa-512-markable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/pwa-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/pwa-apple-touch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading