Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

(improvement) Blog (#365)

Maksim Mrugad5eb569d416
diff --git a/.env.example b/.env.example
index e813cac90..f1912e6ec 100644
--- a/.env.example
+++ b/.env.example
@@ -3,3 +3,4 @@ API_STAGING_URL=http://localhost:5005/
CDN_URL=https://cdn.swetrix.com/
BLOG_URL=https://blog.swetrix.com/
AIAPI_URL=https://aiapi.swetrix.com/
+REDIS_URL=redis://default:[email protected]
diff --git a/.github/workflows/fly.yml b/.github/workflows/fly.yml
index c2caa6890..a9268d0f6 100644
--- a/.github/workflows/fly.yml
+++ b/.github/workflows/fly.yml
@@ -7,9 +7,14 @@ jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
+ timeout-minutes: 10
steps:
+ - name: Pull submodules
+ run: git submodule foreach git pull
+
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- - run: flyctl deploy --remote-only
+ - name: Deploy to fly
+ run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000000000..73e1f8bf6
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "blog-posts"]
+ path = blog-posts
+ url = https://github.com/Swetrix/blog-posts.git
diff --git a/app/css/mdfile.css b/app/css/mdfile.css
new file mode 100644
index 000000000..3a5b0a3e8
--- /dev/null
+++ b/app/css/mdfile.css
@@ -0,0 +1,194 @@
+.single_post {
+ font-size: 16px;
+ line-height: 1.5;
+ word-wrap: break-word;
+ }
+
+ .single_post::before {
+ display: table;
+ content: "";
+ }
+
+ .single_post> :first-child {
+ margin-top: 0 !important;
+ }
+
+ .single_post p,
+ .single_post blockquote,
+ .single_post ul,
+ .single_post ol,
+ .single_post dl,
+ .single_post table,
+ .single_post pre,
+ .single_post details {
+ margin-top: 0;
+ margin-bottom: 16px;
+ }
+
+ .single_post b,
+ strong {
+ font-weight: var(--base-text-weight-semibold, 600);
+ }
+
+ .light .single_post a {
+ cursor: pointer;
+ --tw-text-opacity: 1;
+ color: rgb(79 70 229 / var(--tw-text-opacity));
+ }
+
+ .dark .single_post a {
+ cursor: pointer;
+ --tw-text-opacity: 1;
+ color: rgb(129 140 248 / var(--tw-text-opacity));
+ }
+
+ .single_post blockquote {
+ padding: 0 1em;
+ color: rgb(101, 109, 118);
+ border-left: .25em solid #d0d7de;
+ }
+
+ .single_post h1,
+ .single_post h2,
+ .single_post h3,
+ .single_post h4,
+ .single_post h5,
+ .single_post h6 {
+ margin-top: 24px;
+ margin-bottom: 16px;
+ font-weight: var(--base-text-weight-semibold, 600);
+ line-height: 1.25;
+ }
+
+ .single_post h1 {
+ padding-bottom: .3em;
+ font-size: 2em;
+ border-bottom: 1px solid #d8dee4;
+ }
+
+ .dark .single_post h1 {
+ border-bottom: 1px solid #21262d
+ }
+
+ .single_post h2 {
+ padding-bottom: .3em;
+ font-size: 1.5em;
+ border-bottom: 1px solid #d8dee4;
+ }
+
+ .dark .single_post h2 {
+ border-bottom: 1px solid #21262d
+ }
+
+ .single_post h3 {
+ font-size: 1.25em;
+ }
+
+ .single_post h4 {
+ font-size: 1em;
+ }
+
+ .single_post h5 {
+ font-size: .875em;
+ }
+
+
+ .single_post .highlight pre,
+ .single_post pre {
+ padding: 16px;
+ overflow: auto;
+ font-size: 85%;
+ line-height: 1.45;
+ color: #33363b;
+ background-color: #f6f8fa;
+ border-radius: 6px;
+ }
+
+ .dark .single_post .highlight pre,
+ .dark .single_post pre {
+ color: #d0d7de;
+ background-color: #21262d;
+ }
+
+ .single_post pre {
+ word-wrap: normal;
+ }
+
+ .single_post ul,
+ .single_post ol {
+ padding-left: 2em;
+ }
+
+ .single_post ul {
+ list-style-type: disc;
+ }
+
+ .single_post ol {
+ list-style-type: decimal;
+ }
+
+ .single_post table {
+ display: block;
+ width: 100%;
+ width: max-content;
+ max-width: 100%;
+ overflow: auto;
+ }
+
+ .single_post table tr {
+ background-color: #fff;
+ border-top: 1px solid #d8dee4;
+ }
+
+ .dark .single_post table tr {
+ background-color: #21262d;
+ border-top: 1px solid #21262d;
+ }
+
+ .single_post table tr:nth-child(2n) {
+ background-color: #f6f8fa;
+ }
+
+ .dark .single_post table tr:nth-child(2n) {
+ background-color: #21262d;
+ }
+
+ .single_post table th,
+ .single_post table td {
+ padding: 6px 13px;
+ border: 1px solid #d0d7de;
+ }
+
+ .dark .single_post table th,
+ .dark .single_post table td {
+ border: 1px solid #21262d;
+ }
+
+ .single_post table th {
+ font-weight: var(--base-text-weight-semibold, 600);
+ }
+
+ td,
+ th {
+ padding: 0;
+ }
+
+ .single_post hr {
+ height: .25em;
+ padding: 0;
+ margin: 24px 0;
+ background-color: #d0d7de;
+ border: 0;
+ }
+
+ .dark .single_post hr {
+ background-color: #21262d;
+ }
+
+ .single_post dl dt {
+ padding: 0;
+ margin-top: 16px;
+ font-size: 1em;
+ font-style: italic;
+ font-weight: var(--base-text-weight-semibold, 600);
+ }
\ No newline at end of file
diff --git a/app/entry.server.tsx b/app/entry.server.tsx
index 55db3ab86..db7b76616 100644
--- a/app/entry.server.tsx
+++ b/app/entry.server.tsx
@@ -2,6 +2,7 @@ import type { EntryContext } from '@remix-run/node'
import { PassThrough } from 'node:stream'
import { resolve as feResolve } from 'node:path'
import { createInstance } from 'i18next'
+import Redis from 'ioredis'
import { I18nextProvider, initReactI18next } from 'react-i18next'
import FSBackend from 'i18next-fs-backend'
import { Response } from '@remix-run/node'
@@ -10,16 +11,31 @@ import isbot from 'isbot'
import { renderToPipeableStream } from 'react-dom/server'
import { createSitemapGenerator } from 'remix-sitemap'
-import { MAIN_URL } from './redux/constants'
+import { MAIN_URL, isDevelopment } from './redux/constants'
import i18next from './i18next.server'
import i18n, { detectLanguage } from './i18n'
const ABORT_DELAY = 5_000
+const { REDIS_URL } = process.env
+
+const redis = (REDIS_URL && !isDevelopment) ? new Redis(REDIS_URL) : null
+
+// in seconds; 3600 seconds = 1 hour
+const SITEMAP_CACHE_TIME = 3600
+
const { isSitemapUrl, sitemap } = createSitemapGenerator({
siteUrl: MAIN_URL,
autoLastmod: false,
priority: 0.8,
+ cache: redis ? {
+ get: async () => {
+ return await redis.get('sitemap') || null
+ },
+ set: async (sitemap) => {
+ await redis.set('sitemap', sitemap, 'EX', SITEMAP_CACHE_TIME)
+ },
+ } : undefined,
})
export default async function handleRequest(
diff --git a/app/pages/Blog/Post.tsx b/app/pages/Blog/Post.tsx
new file mode 100644
index 000000000..6d4aaaa78
--- /dev/null
+++ b/app/pages/Blog/Post.tsx
@@ -0,0 +1,86 @@
+import React from 'react'
+import { Link, useLoaderData } from '@remix-run/react'
+import NotFound from 'pages/NotFound'
+
+export default function PostSlug() {
+ const post = useLoaderData()
+
+ if (!post) {
+ return (
+ <NotFound />
+ )
+ }
+
+ return (
+ <div className='bg-gray-50 dark:bg-[#14171c] text-gray-700 dark:text-gray-300'>
+ <div className=' max-w-[52rem] mx-auto px-4 pb-28 sm:px-6 md:px-8 xl:px-12 lg:max-w-6xl'>
+ <div className='overflow-hidden'>
+ <div className='max-w-8xl mx-auto'>
+ <div className='flex px-4 pt-8 pb-10 lg:px-8'>
+ <Link
+ to='/blog'
+ className='group flex font-semibold text-sm leading-6 text-slate-700 hover:text-slate-900 dark:text-slate-200 dark:hover:text-white'
+ >
+ <svg
+ viewBox='0 -9 3 24'
+ className='overflow-visible mr-3 text-slate-400 w-auto h-6 group-hover:text-slate-600 dark:group-hover:text-slate-300'
+ >
+ <path d='M3 0L0 3L3 6' fill='none' stroke='currentColor' strokeWidth='2' strokeLinecap='round' strokeLinejoin='round' />
+ </svg>
+ Go back
+ </Link>
+ </div>
+ </div>
+ <div className='px-4 sm:px-6 md:px-8'>
+ <div className='max-w-3xl mx-auto pb-28'>
+ <main className='bg-gray-50 dark:bg-[#14171c] '>
+ <article className='relative pt-10'>
+ <h1
+ className='text-2xl font-extrabold tracking-tight text-slate-900 dark:text-slate-200 md:text-3xl '>
+ {post.title}
+ </h1>
+ <div className='text-sm leading-6'>
+ <dl>
+ <dt className='sr-only'>Date</dt>
+ <dd className='absolute top-0 inset-x-0 text-slate-700 dark:text-slate-400'>
+ <time dateTime={post.date}>
+ {post.date}
+ </time>
+ </dd>
+ </dl>
+ </div>
+ <div className='mt-6'>
+ <ul className='flex flex-wrap text-sm leading-6 -mt-6 -mx-5'>
+ <li className='flex items-center font-medium whitespace-nowrap px-5 mt-6'>
+ <div className='text-sm leading-4'>
+ {post?.author && (
+ <div className='text-slate-900 dark:text-slate-200'>
+ {post.author}
+ </div>
+ )}
+ {post?.nickname && (
+ <div className='mt-1'>
+ <a
+ href={`https://github.com/${post.nickname}`}
+ className='text-indigo-600 dark:text-indigo-400'
+ >
+ @{post.nickname}
+ </a>
+ </div>
+ )}
+ </div>
+ </li>
+ </ul>
+ </div>
+ <div className='mt-6 single_post'>
+ <div dangerouslySetInnerHTML={{ __html: post.html }} />
+ </div>
+ </article>
+ </main>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ )
+}
diff --git a/app/routes/blog.$category.$slug.tsx b/app/routes/blog.$category.$slug.tsx
new file mode 100644
index 000000000..4b9ab1815
--- /dev/null
+++ b/app/routes/blog.$category.$slug.tsx
@@ -0,0 +1,36 @@
+import type { LoaderFunction, LinksFunction } from '@remix-run/node'
+import { redirect, json } from '@remix-run/node'
+import singlePostCss from 'css/mdfile.css'
+import { getPost } from 'utils/getPosts'
+import { isSelfhosted } from 'redux/constants'
+import Post from 'pages/Blog/Post'
+
+export const links: LinksFunction = () => {
+ return [{ rel: 'stylesheet', href: singlePostCss }]
+}
+
+export const loader: LoaderFunction = async ({ params }) => {
+ if (isSelfhosted) {
+ return redirect('/dashboard', 302)
+ }
+
+ const { slug, category } = params
+
+ if (!slug || !category) {
+ return json(null, {
+ status: 404,
+ })
+ }
+
+ const post = await getPost(slug, category)
+
+ if (!post) {
+ return json(null, {
+ status: 404,
+ })
+ }
+
+ return post
+}
+
+export default Post
diff --git a/app/routes/blog.$slug.tsx b/app/routes/blog.$slug.tsx
new file mode 100644
index 000000000..ec8fa8cd4
--- /dev/null
+++ b/app/routes/blog.$slug.tsx
@@ -0,0 +1,65 @@
+import type { SitemapFunction } from 'remix-sitemap'
+import type { LoaderFunction, LinksFunction } from '@remix-run/node'
+import { redirect, json } from '@remix-run/node'
+import _map from 'lodash/map'
+import _replace from 'lodash/replace'
+import _last from 'lodash/last'
+import _join from 'lodash/join'
+import _isString from 'lodash/isString'
+import singlePostCss from 'css/mdfile.css'
+import {
+ getPost, getSlugFromFilename, getDateFromFilename, getSitemapFileNames,
+} from 'utils/getPosts'
+import { isSelfhosted } from 'redux/constants'
+import Post from 'pages/Blog/Post'
+
+export const links: LinksFunction = () => {
+ return [{ rel: 'stylesheet', href: singlePostCss }]
+}
+
+export const sitemap: SitemapFunction = async () => {
+ const files = await getSitemapFileNames(undefined, true)
+
+ return _map(files, file => {
+ let handle: string
+ let date: string
+
+ if (_isString(file)) {
+ handle = _replace(getSlugFromFilename(file), /\.md$/, '')
+ date = getDateFromFilename(file)
+ } else {
+ const _file = _last(file) as string
+ handle = _join([...file.slice(0, -1), _replace(getSlugFromFilename(_file), /\.md$/, '')], '/')
+ date = getDateFromFilename(_file)
+ }
+
+ return {
+ loc: `/blog/${handle}`,
+ lastmod: date,
+ }
+ })
+}
+
+export const loader: LoaderFunction = async ({ params }) => {
+ if (isSelfhosted) {
+ return redirect('/dashboard', 302)
+ }
+
+ if (!params.slug) {
+ return json(null, {
+ status: 404,
+ })
+ }
+
+ const post = await getPost(params.slug)
+
+ if (!post) {
+ return json(null, {
+ status: 404,
+ })
+ }
+
+ return post
+}
+
+export default Post
diff --git a/app/routes/blog.tsx b/app/routes/blog.tsx
new file mode 100644
index 000000000..c20852eb7
--- /dev/null
+++ b/app/routes/blog.tsx
@@ -0,0 +1,76 @@
+import { Link, useLoaderData } from '@remix-run/react'
+import { blogLoader } from 'utils/getPosts'
+import _map from 'lodash/map'
+import _filter from 'lodash/filter'
+
+export const loader = blogLoader
+
+export default function Posts() {
+ const posts: any[] = useLoaderData()
+
+ if (_filter(posts, post => !post.hidden).length === 0) {
+ return (
+ <div className='flex justify-center items-center min-h-min-footer-ad'>
+ <h1 className='text-3xl font-bold text-slate-900 dark:text-slate-200'>No posts found</h1>
+ </div>
+ )
+ }
+
+ return (
+ <div className='bg-gray-50 dark:bg-[#14171c] text-gray-700 dark:text-gray-300 py-10'>
+ <div className='max-w-[52rem] mx-auto px-4 pb-28 sm:px-6 md:px-8 xl:px-12 lg:max-w-6xl'>
+ <div
+ className='relative sm:pb-12 sm:ml-[calc(2rem+1px)] md:ml-[calc(3.5rem+1px)] lg:ml-[max(calc(14.5rem+1px),calc(100%-48rem))] mt-10 '>
+ <div
+ className='hidden absolute top-3 bottom-0 right-full mr-7 md:mr-[3.25rem] w-px bg-slate-200 dark:bg-slate-700 sm:block'>
+ </div>
+
+ <div className='space-y-16'>
+ {_map(posts, post => {
+ if (post.hidden) {
+ return null
+ }
+
+ return (
+ <article className='relative group' key={post.slug}>
+ <div
+ className='absolute -inset-y-2.5 -inset-x-4 md:-inset-y-4 md:-inset-x-6 sm:rounded-2xl group-hover:bg-slate-50/70 dark:group-hover:bg-slate-800/50'>
+ </div>
+ <svg viewBox='0 0 9 9' className='hidden absolute right-full mr-6 top-2 text-slate-200 dark:text-slate-600 md:mr-12 w-[calc(0.5rem+1px)] h-[calc(0.5rem+1px)] overflow-visible sm:block'>
+ <circle cx='4.5' cy='4.5' r='4.5' stroke='currentColor' className='fill-white dark:fill-slate-800' strokeWidth='2' />
+ </svg>
+ <div className='relative'>
+ <h3 className='text-base font-semibold tracking-tight text-slate-900 dark:text-slate-200 pt-8 lg:pt-0'>
+ {post.title}
+ </h3>
+ {post.intro && (
+ <div className='mt-2 mb-4 prose prose-slate prose-a:relative prose-a:z-10 dark:prose-dark line-clamp-2'>
+ <p>{post.intro}</p>
+ </div>
+ )}
+ <dl className='absolute left-0 top-0 lg:left-auto lg:right-full lg:mr-[calc(5rem+1px)]'>
+ <dt className='sr-only'>Date</dt>
+ <dd className='whitespace-nowrap text-sm leading-6 dark:text-slate-400'>
+ <time dateTime={post.date}>{post.date}</time>
+ </dd>
+ </dl>
+ </div>
+ <Link className='flex items-center text-sm text-indigo-600 dark:text-indigo-400 font-medium' to={post.slug}>
+ <span
+ className='absolute -inset-y-2.5 -inset-x-4 md:-inset-y-4 md:-inset-x-6 sm:rounded-2xl'></span><span
+ className='relative'>Read more<span className='sr-only'>{post.title}</span></span>
+ <svg className='relative mt-px overflow-visible ml-2.5 text-indigo-600 dark:text-indigo-400' width='3' height='6'
+ viewBox='0 0 3 6' fill='none' stroke='currentColor' strokeWidth='2' strokeLinecap='round'
+ strokeLinejoin='round'>
+ <path d='M0 0L3 3L0 6'></path>
+ </svg>
+ </Link>
+ </article>
+ )
+ })}
+ </div>
+ </div>
+ </div>
+ </div>
+ )
+}
\ No newline at end of file
diff --git a/app/utils/getPosts.ts b/app/utils/getPosts.ts
new file mode 100644
index 000000000..783a1ac05
--- /dev/null
+++ b/app/utils/getPosts.ts
@@ -0,0 +1,142 @@
+import path from 'path'
+import fs from 'fs/promises'
+import parseFrontMatter from 'front-matter'
+import { marked } from 'marked'
+import _map from 'lodash/map'
+import _find from 'lodash/find'
+import _includes from 'lodash/includes'
+import _filter from 'lodash/filter'
+import _endsWith from 'lodash/endsWith'
+import _replace from 'lodash/replace'
+import _isEmpty from 'lodash/isEmpty'
+import _size from 'lodash/size'
+import { LoaderFunction } from '@remix-run/node'
+
+const renderer = new marked.Renderer()
+
+renderer.link = (href: string, title: string | null | undefined, text: string) => {
+ const url = new URL(href)
+
+ if (url.hostname !== 'swetrix.com') {
+ url.searchParams.append('utm_source', 'swetrix.com')
+ }
+
+ return `<a href="${url.toString()}" referrerpolicy="strict-origin-when-cross-origin" target="_blank" rel="noopener noreferrer">${text}</a>`
+}
+
+export type PostMarkdownAttributes = {
+ title: string
+ intro?: string
+ date: string
+ author: string
+ nickname: string
+ hidden?: boolean
+}
+
+interface IParseFontMatter {
+ attributes: PostMarkdownAttributes
+ body: string
+}
+
+export const postsPath = path.join(__dirname, '..', 'blog-posts', 'posts')
+
+// Removes first 10 characters from the string (i.e. 2023-10-07-)
+export const getSlugFromFilename = (filename: string) => filename.substring(11)
+export const getDateFromFilename = (filename: string) => filename.substring(0, 10)
+
+const findFilenameBySlug = (list: string[], handle: string) => {
+ return _find(list, (item) => _includes(item, handle))
+}
+
+export const getSitemapFileNames = async (category?: string, infiniteRecursive?: boolean): Promise<any[]> => {
+ const allFiles = await fs.readdir(category ? path.join(postsPath, category) : postsPath) as string[]
+ const directories = _filter(allFiles, (file) => !_endsWith(file, '.md'))
+
+ if (_isEmpty(directories)) {
+ return allFiles
+ }
+
+ const files = _filter(allFiles, (file) => _endsWith(file, '.md'))
+
+ let filesInDirectories: any[] = []
+
+ for (let i = 0; i < _size(directories); ++i) {
+ const directory = directories[i]
+
+ // set to true for infinite depth directory look-up
+ const _files = await getSitemapFileNames(directory, infiniteRecursive)
+ filesInDirectories = [
+ ...filesInDirectories,
+ ..._map(_files, (file) => [directory, file]),
+ ]
+ }
+
+ return [
+ ...files,
+ ...filesInDirectories,
+ ]
+}
+
+export const getFileNames = async (category?: string): Promise<string[]> => {
+ let files
+
+ if (category) {
+ files = await fs.readdir(path.join(postsPath, category)) as string[]
+ } else {
+ files = await fs.readdir(postsPath) as string[]
+ }
+
+ return _filter(files, (file) => _endsWith(file, '.md'))
+}
+
+export async function getPost(slug: string, category?: string) {
+ const files = await getFileNames(category)
+ const filename = findFilenameBySlug(files, slug)
+
+ if (!filename) {
+ return null
+ }
+
+ const filepath = category
+ ? path.join(postsPath, category, filename)
+ : path.join(postsPath, filename)
+
+ const file = await fs.readFile(filepath)
+ const { attributes, body }: IParseFontMatter = parseFrontMatter(file.toString())
+
+ return {
+ slug,
+ title: attributes.title,
+ html: marked(body, { renderer }),
+ hidden: attributes.hidden,
+ intro: attributes.intro,
+ date: attributes.date,
+ author: attributes.author,
+ nickname: attributes.nickname,
+ }
+}
+
+export const blogLoader: LoaderFunction = async () => {
+ const dir = await fs.readdir(postsPath)
+ const filtered = _filter(dir, (file) => _endsWith(file, '.md'))
+
+ return Promise.all(
+ _map(filtered, async filename => {
+ const file = await fs.readFile(
+ path.join(postsPath, filename)
+ )
+ const { attributes }: IParseFontMatter = parseFrontMatter(
+ file.toString()
+ )
+ return {
+ slug: _replace(getSlugFromFilename(filename), /\.md$/, ''),
+ title: attributes.title,
+ hidden: attributes.hidden,
+ intro: attributes.intro,
+ date: attributes.date,
+ author: attributes.author,
+ nickname: attributes.nickname,
+ }
+ })
+ )
+}
diff --git a/blog-posts b/blog-posts
new file mode 160000
index 000000000..24e9a99bc
--- /dev/null
+++ b/blog-posts
@@ -0,0 +1 @@
+Subproject commit 24e9a99bca44d3193c81998abfbd62e7410126fa
diff --git a/package.json b/package.json
index 2c9fffc08..aa67d7b35 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
"build": "remix build",
"dev": "remix dev",
"deploy": "flyctl deploy --remote-only",
+ "refresh-submodules": "git submodule foreach git pull",
"import-env": "node fly_import_env.js --env-file .env",
"dev:staging": "cross-env STAGING=true remix dev",
"start": "remix-serve build",
@@ -42,14 +43,17 @@
"dom-to-image": "^2.6.0",
"file-saver": "^2.0.5",
"flatpickr": "^4.6.13",
+ "front-matter": "^4.0.2",
"i18n-iso-countries": "^7.6.0",
"i18next": "^23.4.9",
"i18next-browser-languagedetector": "^7.1.0",
"i18next-fs-backend": "^2.1.5",
"i18next-http-backend": "^2.2.2",
+ "ioredis": "^5.3.2",
"isbot": "^3.6.13",
"jszip": "^3.10.1",
"lodash": "^4.17.21",
+ "marked": "^9.1.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
diff --git a/remix.config.js b/remix.config.js
index 4d3413920..36bcc8eaa 100644
--- a/remix.config.js
+++ b/remix.config.js
@@ -30,6 +30,7 @@ module.exports = {
'delaunator',
'internmap',
'robust-predicates',
+ 'marked',
],
serverMinify: process.env.NODE_ENV === 'production',
routes(defineRoutes) {