diff --git a/articles.example/config.json b/articles.example/config.json index 100a55b..2af2626 100644 --- a/articles.example/config.json +++ b/articles.example/config.json @@ -5,6 +5,7 @@ "lang": "en", "custom_head": "", "home_count": 5, + "archive_link": " ARCHIVE", "rss_link": " RSS", "about_link": " ABOUT", "back_link": " Back to home", diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 813a653..1aac246 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -1,5 +1,5 @@ @@ -7,6 +7,7 @@ import { BASE_URL, TITLE, RSS_LINK, ABOUT_LINK } from '@lib/config' + diff --git a/src/lib/config.ts b/src/lib/config.ts index aac3a94..a136c42 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -10,6 +10,7 @@ export const COPYRIGHT: string = articlesConfig.copyright; export const FOOTER: string = articlesConfig.footer; export const RSS_LINK: string = articlesConfig.rss_link; export const BACK_LINK: string = articlesConfig.back_link; +export const ARCHIVE_LINK: string = articlesConfig.archive_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; diff --git a/src/router/index.ts b/src/router/index.ts index efdd83d..a7f919c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,17 +1,19 @@ -import { createRouter, createWebHistory } from 'vue-router' -import HomeView from '@views/HomeView.vue' -import AboutView from '@views/AboutView.vue' -import ArticleView from '@views/ArticleView.vue' -import NotFoundView from '@views/NotFoundView.vue' +import { createRouter, createWebHistory } from "vue-router"; +import HomeView from "@views/HomeView.vue"; +import ArchiveView from "@views/ArchiveView.vue"; +import AboutView from "@views/AboutView.vue"; +import ArticleView from "@views/ArticleView.vue"; +import NotFoundView from "@views/NotFoundView.vue"; const router = createRouter({ history: createWebHistory(), routes: [ - { path: '/', component: HomeView }, - { path: '/about/', component: AboutView }, - { path: '/articles/:pathMatch(.*)/', component: ArticleView }, - { path: '/:pathMatch(.*)', component: NotFoundView }, + { path: "/", component: HomeView }, + { path: "/archive/", component: ArchiveView }, + { path: "/about/", component: AboutView }, + { path: "/articles/:pathMatch(.*)/", component: ArticleView }, + { path: "/:pathMatch(.*)", component: NotFoundView }, ], -}) +}); -export default router +export default router; diff --git a/src/views/ArchiveView.vue b/src/views/ArchiveView.vue new file mode 100644 index 0000000..cc8480b --- /dev/null +++ b/src/views/ArchiveView.vue @@ -0,0 +1,38 @@ + + + + + + + + {{ simpleDateFormat(metadata.date) }} + + + + + + + + +