Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move static assets to cdn #4

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions amplify.yml
@@ -0,0 +1,16 @@
version: 1
frontend:
phases:
preBuild:
commands:
- nvm use 18
- corepack enable
- npx --yes nypm i
build:
commands:
- yarn run build
- aws s3 sync .amplify-hosting/static/_nuxt/ s3://is-smm-beaten-yet-public-data/_nuxt/
artifacts:
baseDirectory: .amplify-hosting
files:
- '**/*'
File renamed without changes
3 changes: 1 addition & 2 deletions constants/levelData.ts
@@ -1,5 +1,4 @@
export const DATA_ROOT_URL =
'https://is-smm-beaten-yet-public-data.s3.us-west-2.amazonaws.com/levels';
export const DATA_ROOT_URL = 'https://static.issmmbeatenyet.com/levels';

export const COUNTRIES = [
{ value: 'JP', name: 'Japan' },
Expand Down
3 changes: 3 additions & 0 deletions nuxt.config.ts
Expand Up @@ -2,6 +2,9 @@ import colors from 'tailwindcss/colors';

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
cdnURL: 'https://static.issmmbeatenyet.com/',
},
devtools: { enabled: true },
css: [
'~/assets/css/main.scss',
Expand Down
5 changes: 3 additions & 2 deletions pages/index.vue
Expand Up @@ -76,20 +76,21 @@ $size: 30px;

<script setup lang="ts">
import { SMM_YELLOW } from '~/constants/colors';
import marioPng from '~/assets/img/mario.png';

useSeoMeta({
title: 'Is Super Mario Maker Beaten Yet?',
ogTitle: 'Is Super Mario Maker Beaten Yet?',
description: 'Click here to find out!',
ogDescription: 'Click here to find out!',
ogImage: {
url: 'https://www.issmmbeatenyet.com/img/mario.png',
url: marioPng,
width: 775,
height: 775,
alt: 'Mario in a builder outfit',
type: 'image/png',
},
ogImageSecureUrl: 'https://www.issmmbeatenyet.com/img/mario.png',
ogImageSecureUrl: marioPng,
twitterCard: 'summary_large_image',
themeColor: SMM_YELLOW,
});
Expand Down