diff --git a/README.md b/README.md
index 8e0a8ea..d522516 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,6 @@ bun run build
- [x] nav bar on top
- [ ] date updated
- [ ] archive page
-- [ ] about page
-- [ ] contact/links
+- [x] about page
- [ ] link to previous/next article
- [ ] proper docs
\ No newline at end of file
diff --git a/articles.example/config.json b/articles.example/config.json
index 7f88827..58fa83f 100644
--- a/articles.example/config.json
+++ b/articles.example/config.json
@@ -6,6 +6,7 @@
"custom_head": "",
"home_count": 5,
"rss_link": " RSS",
+ "about_link": " ABOUT",
"back_link": " Back to home",
"published_on": "Published on",
"copyright": "CC BY-NC"
diff --git a/articles.example/style.scss b/articles.example/style.scss
index 447f687..5ee438c 100644
--- a/articles.example/style.scss
+++ b/articles.example/style.scss
@@ -178,6 +178,7 @@ nav .nav-title {
nav .nav-items {
display: flex;
+ gap: .5em;
}
.article-published {
diff --git a/package.json b/package.json
index 3865ab2..7d675f7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "md-blog",
- "version": "1.7.0",
+ "version": "1.8.0",
"private": true,
"type": "module",
"repository": "https://github.com/klemek/md-blog",
diff --git a/src/App.vue b/src/App.vue
index 69f5d57..7c2aa3f 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,29 +1,3 @@
-
-
-
+
diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue
index dddaa80..813a653 100644
--- a/src/components/NavBar.vue
+++ b/src/components/NavBar.vue
@@ -1,11 +1,12 @@
diff --git a/src/lib/articles.ts b/src/lib/articles.ts
index 0ffaef6..eee4a06 100644
--- a/src/lib/articles.ts
+++ b/src/lib/articles.ts
@@ -1,5 +1,23 @@
import type { MarkdownData, Article, ArticleMetadata } from '@interfaces'
import katex from 'katex'
+import { nextTick } from 'vue'
+import hljs from 'highlight.js'
+import mermaid from 'mermaid'
+import { createIcons, icons } from 'lucide'
+
+export async function updateDynamicContent() {
+ await nextTick()
+ hljs.highlightAll()
+ createIcons({
+ icons,
+ nameAttr: 'icon',
+ attrs: {
+ width: '1.1em',
+ height: '1.1em',
+ },
+ })
+ mermaid.run()
+}
function parseMetadata(
srcAttributes: Record,
diff --git a/src/lib/config.ts b/src/lib/config.ts
index 35bf1e5..e32bcf6 100644
--- a/src/lib/config.ts
+++ b/src/lib/config.ts
@@ -1,14 +1,16 @@
import packageJson from '@/../package.json'
+import articlesConfig from '@articles/config.json'
export const NAME: string = packageJson.name
export const VERSION: string = packageJson.version
export const REPOSITORY: string = packageJson.repository
-export const TITLE: string = import.meta.env.VITE_APP_TITLE
-export const SIGNATURE: string = import.meta.env.VITE_APP_SIGNATURE
-export const COPYRIGHT: string = import.meta.env.VITE_APP_COPYRIGHT
-export const RSS_LINK: string = import.meta.env.VITE_APP_RSS_LINK
-export const BACK_LINK: string = import.meta.env.VITE_APP_BACK_LINK
-export const HOME_COUNT: number = parseInt(import.meta.env.VITE_APP_HOME_COUNT)
-export const PUBLISHED_ON: string = import.meta.env.VITE_APP_PUBLISHED_ON
+export const TITLE: string = articlesConfig['title']
+export const SIGNATURE: string = articlesConfig['signature']
+export const COPYRIGHT: string = articlesConfig['copyright']
+export const RSS_LINK: string = articlesConfig['rss_link']
+export const BACK_LINK: string = articlesConfig['back_link']
+export const ABOUT_LINK: string = articlesConfig['about_link']
+export const HOME_COUNT: number = articlesConfig['home_count']
+export const PUBLISHED_ON: string = articlesConfig['published_on']
export const BASE_URL: string = import.meta.env.BASE_URL
export const PROD: boolean = import.meta.env.PROD
diff --git a/src/router/index.ts b/src/router/index.ts
index d5d3e2b..d5a9d9d 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -1,3 +1,4 @@
+import AboutView from '@views/AboutView.vue'
import ArticleView from '@views/ArticleView.vue'
import HomeView from '@views/HomeView.vue'
import NotFoundView from '@views/NotFoundView.vue'
@@ -7,6 +8,7 @@ const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/', component: HomeView },
+ { path: '/about/', component: AboutView },
{ path: '/articles/:pathMatch(.*)/', component: ArticleView },
{ path: '/:pathMatch(.*)', component: NotFoundView },
],
diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue
new file mode 100644
index 0000000..4f0be9a
--- /dev/null
+++ b/src/views/AboutView.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ArticleView.vue b/src/views/ArticleView.vue
index d3e078c..f7a2c45 100644
--- a/src/views/ArticleView.vue
+++ b/src/views/ArticleView.vue
@@ -1,7 +1,7 @@
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index c3b5a8b..7970d7f 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -1,6 +1,6 @@
diff --git a/src/views/NotFoundView.vue b/src/views/NotFoundView.vue
index 35c983c..a19d37b 100644
--- a/src/views/NotFoundView.vue
+++ b/src/views/NotFoundView.vue
@@ -2,8 +2,9 @@
import { TITLE } from '@lib/config'
import { stripHTML } from '@lib/strings'
import PageFooter from '@components/PageFooter.vue'
-import { onBeforeMount, ref } from 'vue'
+import { onBeforeMount, onMounted, onUpdated, ref } from 'vue'
import NavBar from '@components/NavBar.vue'
+import { updateDynamicContent } from '@/lib/articles'
const html = ref('')
@@ -11,7 +12,11 @@ onBeforeMount(async () => {
window.document.title = stripHTML(TITLE)
html.value = (await import('@articles/not_found.md')).html
+
+ await updateDynamicContent()
})
+onMounted(updateDynamicContent)
+onUpdated(updateDynamicContent)
diff --git a/vite.config.ts b/vite.config.ts
index 8f1ef7b..7ab578c 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -14,13 +14,7 @@ export default ({ mode }: { mode: string }) => {
process.env.VITE_APP_TITLE = articlesConfig['title']
process.env.VITE_APP_TITLE_NO_HTML = articlesConfig['title'].replace(/(<([^>]+)>)/gi, '').trim()
process.env.VITE_APP_LANG = articlesConfig['lang']
- process.env.VITE_APP_SIGNATURE = articlesConfig['signature']
process.env.VITE_CUSTOM_HEAD = articlesConfig['custom_head']
- process.env.VITE_APP_COPYRIGHT = articlesConfig['copyright']
- process.env.VITE_APP_RSS_LINK = articlesConfig['rss_link']
- process.env.VITE_APP_BACK_LINK = articlesConfig['back_link']
- process.env.VITE_APP_HOME_COUNT = articlesConfig['home_count'].toString()
- process.env.VITE_APP_PUBLISHED_ON = articlesConfig['published_on']
return defineConfig({
plugins: [vue(), vueDevTools(), mdPlugin({ mode: [Mode.HTML] })],