diff --git a/package.json b/package.json index f03b54a..564a277 100644 --- a/package.json +++ b/package.json @@ -5,15 +5,12 @@ "type": "module", "scripts": { "dev": "next dev", - "server": "npx decap-server", "build": "next build", - "docker:build": "docker build -t www-aaronjy-2024 .", "postbuild": "next-sitemap --config next-sitemap.config.cjs", "start": "next start", "link": "npx standard", "format": "npx standard --fix", "prepare": "husky", - "deploy": "./util/pre-deploy.sh && ./util/deploy-gcloud.sh", "test": "jest --verbose --passWithNoTests", "lint": "next lint" }, diff --git a/public/admin/config.yml b/public/admin/config.yml deleted file mode 100644 index c3877ec..0000000 --- a/public/admin/config.yml +++ /dev/null @@ -1,79 +0,0 @@ -local_backend: true -backend: - name: git-gateway - branch: main # Branch to update (optional; defaults to master) -media_folder: public/img -public_folder: img -collections: - - name: recipes - label: Recipes - folder: content/recipes - create: true - fields: - - {label: Title, name: title, widget: string} - - {label: "Publish Date", name: pubdate, widget: datetime, required: false, default: "" } - - {label: Description, name: desc, widget: text} - - {label: Body, name: body, widget: markdown } - - - name: writing - label: Writing - folder: content/writing - create: true - fields: - - {label: Title, name: title, widget: string} - - {label: "Publish Date", name: pubdate, widget: datetime, required: false, default: "" } - - {label: Description, name: desc, widget: text} - - {label: Body, name: body, widget: markdown } - - - name: fun - label: Fun - folder: content/fun - create: true - fields: - - {label: Title, name: title, widget: string} - - {label: "Publish Date", name: pubdate, widget: datetime, required: false, default: "" } - - {label: Description, name: desc, widget: text} - - {label: Body, name: body, widget: markdown } - - - name: "pages" - label: "Pages" - files: - - label: "CV" - name: "cv" - file: "content/pages/cv.yml" - fields: - - label: Core competencies - widget: list - name: competencies - allow_add: true - - label: Education history - widget: list - name: education - allow_add: true - - label: Certifications - widget: list - name: certifications - allow_add: true - - label: Languages - widget: list - name: languages - allow_add: true - fields: - - {label: "Name", name: name, widget: string } - - {label: "Proficiency", name: proficiency, widget: string } - - label: Technical skills - widget: list - name: tech-skills - - label: Professional experience - name: experience - widget: list - fields: - - { label: Position, name: position, widget: string } - - { label: Employer, name: employer, widget: string } - - { label: Start date, name: start, widget: string } - - { label: End date, name: end, widget: string } - - { label: Description, name: desc, widget: markdown } - - - - diff --git a/public/admin/index.html b/public/admin/index.html deleted file mode 100644 index b00e2a0..0000000 --- a/public/admin/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Content Manager - - - - - - - \ No newline at end of file diff --git a/src/components/Article/Article.jsx b/src/components/Article/Article.jsx index a04043f..3958fdf 100644 --- a/src/components/Article/Article.jsx +++ b/src/components/Article/Article.jsx @@ -3,7 +3,15 @@ import { NextSeo } from 'next-seo' import Link from 'next/link' import React from 'react' +import 'highlight.js/styles/atom-one-dark.css' +import hljs from 'highlight.js' +import { useEffect } from 'react' + function Article ({ attributes, html }) { + + useEffect(() => { + hljs.highlightAll(); + }, [attributes, html]); return ( <>

{attributes.title}

diff --git a/src/pages/_app.js b/src/pages/_app.js index 2eb84a8..4905fa8 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -1,15 +1,7 @@ -import '@/styles/globals.css' -import 'highlight.js/styles/atom-one-dark.css' - -import hljs from 'highlight.js' import { DefaultSeo } from 'next-seo' -import { useEffect } from 'react' +import '@/styles/globals.css' export default function App ({ Component, pageProps }) { - useEffect(() => { - hljs.highlightAll() - }, [Component]) - return ( <>