Skip to content
Merged
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 .github/workflows/seo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libgbm-dev
npx puppeteer browsers install chrome

- name: Run script
env: # Or as an environment variable
Expand Down
2 changes: 2 additions & 0 deletions scripts/migrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ async function putSecret(name: string, value?: string) {
if (value) {
console.log(`Put ${name}`)
await $`echo "${value}" | bun wrangler secret put ${name}`
} else {
console.log(`Skip ${name}, value is not defined.`)
}
}

Expand Down
3 changes: 3 additions & 0 deletions server/src/services/seo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export const SEOService = (db: DB, env: Env) => {
for (const key in query) {
url += `&${key}=${query[key]}`;
}
if (url.endsWith('/') || url === '') {
url += 'index.html';
}
const key = path.join(folder, url);
try {
const url = `${accessHost}/${key}`;
Expand Down