| null = null
@@ -36,7 +36,7 @@
modalData.show = true
modalData.type = 'bitcoin'
modalData.address = BTC_ADDRESS
- }
+ },
},
{
name: 'ethereum',
@@ -44,13 +44,13 @@
modalData.show = true
modalData.type = 'etheruem'
modalData.address = ETH_ADDRESS
- }
- }
+ },
+ },
]
const supportLogos = [
{ name: 'buycoffee', url: 'https://buymeacoffee.com/arkbuilders' },
- { name: 'patreon', url: 'https://www.patreon.com/ARKBuilders' }
+ { name: 'patreon', url: 'https://www.patreon.com/ARKBuilders' },
]
const copyAddress = (value: string) => {
@@ -83,6 +83,7 @@
{#each supportLogosCrypto as logo}
diff --git a/src/utils/constants.ts b/src/utils/constants.ts
index 96491a8..bfce03a 100644
--- a/src/utils/constants.ts
+++ b/src/utils/constants.ts
@@ -163,6 +163,12 @@ export interface Issue {
languages: string[]
}
+export interface Tag {
+ text: string
+ slug: string
+ count: number
+}
+
export const appLogos: Record = {
rate: RateLogo,
memo: MemoLogo,
diff --git a/src/utils/entries.ts b/src/utils/entries.ts
index 2df9258..43eb0a4 100644
--- a/src/utils/entries.ts
+++ b/src/utils/entries.ts
@@ -1,7 +1,7 @@
import { browser } from '$app/environment'
import { config, user } from '$lib/config'
+import type { Blog, Tag } from '$utils/constants'
import { slug } from 'github-slugger'
-import type { Blog } from './constants'
// we require some server-side APIs to parse all metadata
if (browser) {
@@ -60,7 +60,7 @@ const getMetadata = (entryType: string, filepath: string, entry: any) => {
: null,
tag: entry.metadata?.type?.split(' ').shift().toLowerCase() || null,
- tags: entry.metadata?.tags || []
+ tags: entry.metadata?.tags || [],
// whether or not this file is `my-post.md` or `my-post/index.md`
// (needed to do correct dynamic import in posts/[slug].svelte)
@@ -92,17 +92,11 @@ export const getEntries = (entryType: string, includeDraft: boolean = false) =>
.map((entry, index, allEntries) => ({
...entry,
next: allEntries[index - 1],
- prev: allEntries[index + 1]
+ prev: allEntries[index + 1],
}))
)
}
-interface Tag {
- text: string
- slug: string
- count: number
-}
-
export const getTags = () => {
const posts = getEntries('posts') as Blog[]
let tags = posts
diff --git a/vite.config.ts b/vite.config.ts
index 4b23ad9..cc6e56c 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,6 +1,8 @@
import { sveltekit } from '@sveltejs/kit/vite'
import path from 'path'
import { defineConfig } from 'vite'
+import { compression } from 'vite-plugin-compression2'
+import { ViteImageOptimizer } from 'vite-plugin-image-optimizer'
export default defineConfig({
resolve: {
@@ -8,7 +10,15 @@ export default defineConfig({
$utils: path.resolve('./src/utils'),
},
},
- plugins: [sveltekit()],
+ plugins: [
+ sveltekit(),
+ ViteImageOptimizer({
+ jpeg: {
+ quality: 85,
+ },
+ }),
+ compression(),
+ ],
optimizeDeps: {
include: ['lodash.get', 'lodash.isequal', 'lodash.clonedeep'],
},