Skip to content

Commit

Permalink
feat: correction hyperlink techno ++ date
Browse files Browse the repository at this point in the history
  • Loading branch information
batleforc committed Sep 20, 2024
1 parent 259b074 commit b4b820a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/front/src/component/Page/PageMetadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defineProps<{
<p class="font-bold text-2xl">{{ metadata.writter.name }}</p>
</a>
<div>
<p>{{ metadata.date }}</p>
<p>{{ new Date(metadata.date).toLocaleString() }}</p>
</div>
</div>
</template>
Expand Down
11 changes: 10 additions & 1 deletion apps/front/src/stores/doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,17 @@ export const useDocStore = defineStore({
techno: string,
category: DocCategory,
): PageShort | undefined {
if (
category.name.toLowerCase() === techno.toLowerCase() &&
category.has_index
) {
return category.pages.find((page) => page.name === 'index');
}
for (const page of category.pages) {
if (page.name.toLowerCase() === techno.toLowerCase()) {
if (
page.name.toLowerCase() === techno.toLowerCase() ||
page.metadata.title.toLowerCase() === techno.toLowerCase()
) {
return page;
}
}
Expand Down
2 changes: 2 additions & 0 deletions apps/front/src/stores/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export const usePageStore = defineStore({
.catch((err) => {
console.error(err);
this.loadingError = 'Failed to load page';
this.pagePath = '';
this.page = undefined;
})
.finally(() => {
this.pageLoading = false;
Expand Down
2 changes: 1 addition & 1 deletion folio_content/content/Techno/Infra/Kube/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date: 2024-07-16T22:51:00Z
title: "kubernetes"
title: "Kubernetes"
description: "Kubernetes - Container Orchestration"
spec:
blog: false
Expand Down

0 comments on commit b4b820a

Please sign in to comment.