Skip to content

Commit

Permalink
feat: migrate to cloudflare pages
Browse files Browse the repository at this point in the history
  • Loading branch information
DorielRivalet committed Feb 28, 2024
1 parent 05b4555 commit 69a2de7
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
uses: treosh/lighthouse-ci-action@v11
with:
urls: |
https://frontier-compendium.netlify.app/
https://frontier-compendium.netlify.app/site-preferences/
https://frontier-compendium.pages.dev/
https://frontier-compendium.pages.dev/site-preferences/
# budgetPath: ./budget.json # test performance budgets
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
1 change: 1 addition & 0 deletions .svelte-kit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"ambient.d.ts",
"non-ambient.d.ts",
"./types/**/$types.d.ts",
"../svelte.config.js",
"../vite.config.js",
"../vite.config.ts",
"../src/**/*.js",
Expand Down
75 changes: 56 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"Monster Hunter Frontier",
"Monster Hunter Frontier Z"
],
"homepage": "https://frontier-compendium.netlify.app/",
"homepage": "https://frontier-compendium.pages.dev/",
"bugs": {
"url": "https://github.com/DorielRivalet/frontier-compendium/issues"
},
Expand Down Expand Up @@ -50,6 +50,7 @@
"@release-it/conventional-changelog": "^8.0.1",
"@rollup/plugin-typescript": "^11.1.6",
"@sveltejs/adapter-auto": "^3.1.1",
"@sveltejs/adapter-cloudflare": "^4.1.0",
"@sveltejs/adapter-netlify": "^4.1.0",
"@sveltejs/kit": "^2.5.2",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/client/components/Schema-org.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ SOFTWARE.
'https://github.com/DorielRivalet/frontier-compendium/blob/main/LICENSE.md',
alternateName: 'mhfz-compendium',
name: mainEntity.name,
sameAs: 'https://frontier-compendium.netlify.app',
sameAs: 'https://frontier-compendium.pages.dev',
url: mainEntity.url,
headline: mainEntity.headline,
description: mainEntity.description,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const projectGitHub =
'https://github.com/DorielRivalet/frontier-compendium';
export const developmentStage = 'alpha';
export const appVersion = '0.2.0';
export const website = 'https://frontier-compendium.netlify.app';
export const website = 'https://frontier-compendium.pages.dev';
export const datePublished = '2023-09-02';
export const apiCacheTimeouts = {
github: 60 * 60 * 24,
Expand Down
6 changes: 4 additions & 2 deletions src/routes/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
>{constant.authorName} &copy {new Date().getUTCFullYear()}</Link
>
<div>
Powered by <Link href="https://docs.netlify.com/">Netlify</Link> and <Link
href="https://kit.svelte.dev/docs/introduction">SvelteKit</Link
Powered by <Link href="https://developers.cloudflare.com/pages/"
>Cloudflare Pages</Link
> and <Link href="https://kit.svelte.dev/docs/introduction"
>SvelteKit</Link
>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/sverdle/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<meta content={projectDescription} property="og:description" />
<meta name="description" content={projectDescription} />
<meta
content="https://frontier-compendium.netlify.app/sverdle"
content="https://frontier-compendium.pages.dev/sverdle"
property="og:url"
/>
<meta content={logo} property="og:image" />
Expand Down
12 changes: 8 additions & 4 deletions static/offline.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<meta name="viewport" content="width=device-width" />
<link
rel="canonical"
href="https://frontier-compendium.netlify.app/offline"
href="https://frontier-compendium.pages.dev/offline"
/>

<title>Raviente's Den</title>
Expand All @@ -28,7 +28,7 @@
<!-- Facebook Meta Tags -->
<meta
property="og:url"
content="https://frontier-compendium.netlify.app/offline"
content="https://frontier-compendium.pages.dev/offline"
/>
<meta property="og:type" content="website" />
<meta property="og:title" content="Raviente's Den" />
Expand Down Expand Up @@ -58,7 +58,7 @@
<body>
<header>
<a
href="https://frontier-compendium.netlify.app"
href="https://frontier-compendium.pages.dev"
aria-label="Logo, back to homepage,"
>
<img
Expand Down Expand Up @@ -160,7 +160,11 @@ <h2>🐍 Snake Game 🐍</h2>
<div class="item-container">
<a href="https://github.com/DorielRivalet" id="author-link"></a>
<div>
Powered by <a href="https://docs.netlify.com/">Netlify</a> and
Powered by
<a href="https://developers.cloudflare.com/pages/"
>Cloudflare Pages</a
>
and
<a href="https://kit.svelte.dev/docs/introduction">SvelteKit</a>
</div>
</div>
Expand Down
15 changes: 6 additions & 9 deletions svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* found in the LICENSE file.
*/

import adapter from '@sveltejs/adapter-netlify';
import adapter from '@sveltejs/adapter-cloudflare';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { optimizeImports } from 'carbon-preprocess-svelte';

Expand All @@ -18,14 +18,11 @@ const config = {
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter({
// if true, will create a Netlify Edge Function rather
// than using standard Node-based functions
edge: false,

// if true, will split your app into multiple functions
// instead of creating a single one for the entire app.
// if `edge` is true, this option cannot be used
split: false,
// See below for an explanation of these options
routes: {
include: ['/*'],
exclude: ['<all>'],
},
}),
},
};
Expand Down

0 comments on commit 69a2de7

Please sign in to comment.