From 2c10e79ea1f2594cf67fc478d5e7f5c06dceab28 Mon Sep 17 00:00:00 2001 From: Max batleforc Date: Fri, 6 Sep 2024 19:13:25 +0200 Subject: [PATCH] feat: Rename folder and handle the Upper/Lowercase ++ add more doc on the data folder --- apps/back/src/api/page/get_page.rs | 2 +- .../src/component/Doc/DocSidebarItem.vue | 112 +++++++++--------- folio_content/content/{cicd => CICD}/index.md | 0 .../content/{cicd => CICD}/portfolio-cicd.md | 0 .../content/{project => Project}/index.md | 0 .../{project => Project}/kube-weebo.md | 0 .../content/{project => Project}/portfolio.md | 0 .../content/Techno/Data/Bucket/MinIO.md | 24 ++++ .../content/Techno/Data/DataBase/MariaDB.md | 24 ++++ .../content/Techno/Data/DataBase/MongoDB.md | 24 ++++ .../Techno/Data/DataBase/PostgreSQL.md | 24 ++++ .../content/Techno/Data/Event/Kafka.md | 22 ++++ .../Infra/Application}/index.md | 0 .../cicd => Techno/Infra/CICD}/concourse.md | 0 .../cicd => Techno/Infra/CICD}/github.md | 0 .../cicd => Techno/Infra/CICD}/gitlab.md | 0 .../cicd => Techno/Infra/CICD}/tekton.md | 0 .../gitops => Techno/Infra/GitOps}/argocd.md | 2 +- .../gitops => Techno/Infra/GitOps}/fluxcd.md | 0 .../infra/kube => Techno/Infra/Kube}/helm.md | 0 .../infra/kube => Techno/Infra/Kube}/index.md | 0 .../infra/kube => Techno/Infra/Kube}/k3s.md | 0 .../kube => Techno/Infra/Kube}/microk8s.md | 2 +- .../{techno/infra => Techno/Infra}/ansible.md | 0 .../back => Techno/Language/Back}/c++.md | 0 .../back => Techno/Language/Back}/csharp.md | 0 .../back => Techno/Language/Back}/golang.md | 0 .../back => Techno/Language/Back}/java.md | 0 .../back => Techno/Language/Back}/node.md | 0 .../back => Techno/Language/Back}/php.md | 0 .../back => Techno/Language/Back}/python.md | 0 .../back => Techno/Language/Back}/rust.md | 0 .../Language/Front}/javascript.md | 0 .../front => Techno/Language/Front}/react.md | 0 .../front => Techno/Language/Front}/svelte.md | 0 .../front => Techno/Language/Front}/vuejs.md | 0 .../Language/Progicielle}/index.md | 0 .../language => Techno/Language}/index.md | 0 .../content/{techno => Techno}/index.md | 0 folio_content/content/techno/data/index.md | 10 -- .../back/markdown_struct/src/page_database.rs | 7 +- 41 files changed, 182 insertions(+), 71 deletions(-) rename folio_content/content/{cicd => CICD}/index.md (100%) rename folio_content/content/{cicd => CICD}/portfolio-cicd.md (100%) rename folio_content/content/{project => Project}/index.md (100%) rename folio_content/content/{project => Project}/kube-weebo.md (100%) rename folio_content/content/{project => Project}/portfolio.md (100%) create mode 100644 folio_content/content/Techno/Data/Bucket/MinIO.md create mode 100644 folio_content/content/Techno/Data/DataBase/MariaDB.md create mode 100644 folio_content/content/Techno/Data/DataBase/MongoDB.md create mode 100644 folio_content/content/Techno/Data/DataBase/PostgreSQL.md create mode 100644 folio_content/content/Techno/Data/Event/Kafka.md rename folio_content/content/{techno/infra/application => Techno/Infra/Application}/index.md (100%) rename folio_content/content/{techno/infra/cicd => Techno/Infra/CICD}/concourse.md (100%) rename folio_content/content/{techno/infra/cicd => Techno/Infra/CICD}/github.md (100%) rename folio_content/content/{techno/infra/cicd => Techno/Infra/CICD}/gitlab.md (100%) rename folio_content/content/{techno/infra/cicd => Techno/Infra/CICD}/tekton.md (100%) rename folio_content/content/{techno/infra/gitops => Techno/Infra/GitOps}/argocd.md (96%) rename folio_content/content/{techno/infra/gitops => Techno/Infra/GitOps}/fluxcd.md (100%) rename folio_content/content/{techno/infra/kube => Techno/Infra/Kube}/helm.md (100%) rename folio_content/content/{techno/infra/kube => Techno/Infra/Kube}/index.md (100%) rename folio_content/content/{techno/infra/kube => Techno/Infra/Kube}/k3s.md (100%) rename folio_content/content/{techno/infra/kube => Techno/Infra/Kube}/microk8s.md (97%) rename folio_content/content/{techno/infra => Techno/Infra}/ansible.md (100%) rename folio_content/content/{techno/language/back => Techno/Language/Back}/c++.md (100%) rename folio_content/content/{techno/language/back => Techno/Language/Back}/csharp.md (100%) rename folio_content/content/{techno/language/back => Techno/Language/Back}/golang.md (100%) rename folio_content/content/{techno/language/back => Techno/Language/Back}/java.md (100%) rename folio_content/content/{techno/language/back => Techno/Language/Back}/node.md (100%) rename folio_content/content/{techno/language/back => Techno/Language/Back}/php.md (100%) rename folio_content/content/{techno/language/back => Techno/Language/Back}/python.md (100%) rename folio_content/content/{techno/language/back => Techno/Language/Back}/rust.md (100%) rename folio_content/content/{techno/language/front => Techno/Language/Front}/javascript.md (100%) rename folio_content/content/{techno/language/front => Techno/Language/Front}/react.md (100%) rename folio_content/content/{techno/language/front => Techno/Language/Front}/svelte.md (100%) rename folio_content/content/{techno/language/front => Techno/Language/Front}/vuejs.md (100%) rename folio_content/content/{techno/language/progicielle => Techno/Language/Progicielle}/index.md (100%) rename folio_content/content/{techno/language => Techno/Language}/index.md (100%) rename folio_content/content/{techno => Techno}/index.md (100%) delete mode 100644 folio_content/content/techno/data/index.md diff --git a/apps/back/src/api/page/get_page.rs b/apps/back/src/api/page/get_page.rs index 905de40..c049656 100644 --- a/apps/back/src/api/page/get_page.rs +++ b/apps/back/src/api/page/get_page.rs @@ -36,7 +36,7 @@ pub async fn get_page( if info.path.is_empty() { return HttpResponse::NotFound().finish(); } - if let Some(page) = db_folder.get_page_in_sub_folder_by_path(info.path.clone()) { + if let Some(page) = db_folder.get_page_in_sub_folder_by_path(info.path.clone().to_lowercase()) { return HttpResponse::Ok().json(page); } else { return HttpResponse::NotFound().finish(); diff --git a/apps/front/src/component/Doc/DocSidebarItem.vue b/apps/front/src/component/Doc/DocSidebarItem.vue index cb322f9..28898ff 100644 --- a/apps/front/src/component/Doc/DocSidebarItem.vue +++ b/apps/front/src/component/Doc/DocSidebarItem.vue @@ -4,34 +4,34 @@ import { computed, ref } from 'vue'; import IcoMoonSVG from '../helper/IcoMoonSVG.vue'; const props = defineProps<{ - docContent: DocCategory; - path: Array; + docContent: DocCategory; + path: Array; }>(); const pageFiltered = computed(() => { - return props.docContent.pages.filter(page => page.name !== 'index'); + return props.docContent.pages.filter(page => page.name !== 'index'); }); const hasContent = computed(() => { - return pageFiltered.value.length > 0 || props.docContent.sub_categories.length > 0; + return pageFiltered.value.length > 0 || props.docContent.sub_categories.length > 0; }); const fromOpen = computed(() => { - return props.path.length > 0 && props.docContent.name === props.path[0]; + return props.path.length > 0 && props.docContent.name === props.path[0]; }); const pathToChild = computed(() => { - if (fromOpen.value) { - return props.path.slice(1); - } - return []; + if (fromOpen.value) { + return props.path.slice(1); + } + return []; }); const pathIndex = computed(() => { - if (!props.docContent.has_index) { - return []; - } - return props.docContent.pages.find(page => page.name === 'index').path.split('/').filter(path => path !== 'index'); + if (!props.docContent.has_index) { + return []; + } + return props.docContent.pages.find(page => page.name === 'index').path.split('/').filter(path => path !== 'index'); }); const sidebarOpen = ref(fromOpen.value); @@ -39,73 +39,73 @@ const sidebarOpen = ref(fromOpen.value); \ No newline at end of file diff --git a/folio_content/content/cicd/index.md b/folio_content/content/CICD/index.md similarity index 100% rename from folio_content/content/cicd/index.md rename to folio_content/content/CICD/index.md diff --git a/folio_content/content/cicd/portfolio-cicd.md b/folio_content/content/CICD/portfolio-cicd.md similarity index 100% rename from folio_content/content/cicd/portfolio-cicd.md rename to folio_content/content/CICD/portfolio-cicd.md diff --git a/folio_content/content/project/index.md b/folio_content/content/Project/index.md similarity index 100% rename from folio_content/content/project/index.md rename to folio_content/content/Project/index.md diff --git a/folio_content/content/project/kube-weebo.md b/folio_content/content/Project/kube-weebo.md similarity index 100% rename from folio_content/content/project/kube-weebo.md rename to folio_content/content/Project/kube-weebo.md diff --git a/folio_content/content/project/portfolio.md b/folio_content/content/Project/portfolio.md similarity index 100% rename from folio_content/content/project/portfolio.md rename to folio_content/content/Project/portfolio.md diff --git a/folio_content/content/Techno/Data/Bucket/MinIO.md b/folio_content/content/Techno/Data/Bucket/MinIO.md new file mode 100644 index 0000000..2ae8024 --- /dev/null +++ b/folio_content/content/Techno/Data/Bucket/MinIO.md @@ -0,0 +1,24 @@ +--- +date: 2024-07-16T22:51:00Z +title: "MinIO" +description: "MinIO - The S3 compatible object storage" +spec: + blog: false + project: false + doc: true +links: + - name: "MinIO" + url: "https://min.io/" +techno: + - "Storage" + - "Object" +tags: + - "Storage" + - "Object" +--- + +## MinIO + +MinIO is an object storage server, it's compatible with Amazon S3 cloud storage service. It's a good alternative to Amazon S3. + +MinIO is my go to object storage server, it's easy to use and to self-host. diff --git a/folio_content/content/Techno/Data/DataBase/MariaDB.md b/folio_content/content/Techno/Data/DataBase/MariaDB.md new file mode 100644 index 0000000..4b7ee1d --- /dev/null +++ b/folio_content/content/Techno/Data/DataBase/MariaDB.md @@ -0,0 +1,24 @@ +--- +date: 2024-07-16T22:51:00Z +title: "MariaDB" +description: "MariaDB - The SQL database" +spec: + blog: false + project: false + doc: true +links: + - name: "MariaDB" + url: "https://mariadb.org/" +techno: + - "SQL" + - "DataBase" +tags: + - "SQL" + - "DataBase" +--- + +## MariaDB + +MariaDB is a SQL database, it was a fork of MySQL. Well with enough new feature and evolution over time we can say that it's now a different database with layer of compatbiility with MySQL. + +I've used MariaDB for a long time, it's a pretty good database, it's easy to use and to maintain. It's a good database for small to medium project, for big project i would recommend to use PostgreSQL. diff --git a/folio_content/content/Techno/Data/DataBase/MongoDB.md b/folio_content/content/Techno/Data/DataBase/MongoDB.md new file mode 100644 index 0000000..447bc78 --- /dev/null +++ b/folio_content/content/Techno/Data/DataBase/MongoDB.md @@ -0,0 +1,24 @@ +--- +date: 2024-07-16T22:51:00Z +title: "MongoDB" +description: "MongoDB - The NoSQL database" +spec: + blog: false + project: false + doc: true +links: + - name: "MongoDB" + url: "https://www.mongodb.com/" +techno: + - "NoSQL" + - "DataBase" +tags: + - "NoSQL" + - "DataBase" +--- + +## MongoDB + +MongoDB is a NoSQL database, a document-oriented database. + +I've used MongoDB for a long time, it's a pretty good database in the NoSQL world, it's easy to use and to maintain. diff --git a/folio_content/content/Techno/Data/DataBase/PostgreSQL.md b/folio_content/content/Techno/Data/DataBase/PostgreSQL.md new file mode 100644 index 0000000..dbef66e --- /dev/null +++ b/folio_content/content/Techno/Data/DataBase/PostgreSQL.md @@ -0,0 +1,24 @@ +--- +date: 2024-07-16T22:51:00Z +title: "PostgreSQL" +description: "PostgreSQL - The SQL database" +spec: + blog: false + project: false + doc: true +links: + - name: "PostgreSQL" + url: "https://www.postgresql.org/" +techno: + - "SQL" + - "DataBase" +tags: + - "SQL" + - "DataBase" +--- + +## PostgreSQL + +PostgreSQL is a SQL database, it's a powerful database, it's a good database for small to big project. It's easy to use and to maintain. + +For my own project, even small one. I tend to choose PostgreSQL when i need a SQL database. diff --git a/folio_content/content/Techno/Data/Event/Kafka.md b/folio_content/content/Techno/Data/Event/Kafka.md new file mode 100644 index 0000000..0e59b61 --- /dev/null +++ b/folio_content/content/Techno/Data/Event/Kafka.md @@ -0,0 +1,22 @@ +--- +date: 2024-07-16T22:51:00Z +title: "Kafka" +description: "Kafka - The event streaming platform" +spec: + blog: false + project: false + doc: true +links: + - name: "Kafka" + url: "https://kafka.apache.org/" +techno: + - "Event" + - "Streaming" +tags: + - "Event" + - "Streaming" +--- + +## Kafka + +Kafka is an event streaming platform, it's a distributed streaming platform. It's a good platform for building real-time data pipelines and streaming applications. diff --git a/folio_content/content/techno/infra/application/index.md b/folio_content/content/Techno/Infra/Application/index.md similarity index 100% rename from folio_content/content/techno/infra/application/index.md rename to folio_content/content/Techno/Infra/Application/index.md diff --git a/folio_content/content/techno/infra/cicd/concourse.md b/folio_content/content/Techno/Infra/CICD/concourse.md similarity index 100% rename from folio_content/content/techno/infra/cicd/concourse.md rename to folio_content/content/Techno/Infra/CICD/concourse.md diff --git a/folio_content/content/techno/infra/cicd/github.md b/folio_content/content/Techno/Infra/CICD/github.md similarity index 100% rename from folio_content/content/techno/infra/cicd/github.md rename to folio_content/content/Techno/Infra/CICD/github.md diff --git a/folio_content/content/techno/infra/cicd/gitlab.md b/folio_content/content/Techno/Infra/CICD/gitlab.md similarity index 100% rename from folio_content/content/techno/infra/cicd/gitlab.md rename to folio_content/content/Techno/Infra/CICD/gitlab.md diff --git a/folio_content/content/techno/infra/cicd/tekton.md b/folio_content/content/Techno/Infra/CICD/tekton.md similarity index 100% rename from folio_content/content/techno/infra/cicd/tekton.md rename to folio_content/content/Techno/Infra/CICD/tekton.md diff --git a/folio_content/content/techno/infra/gitops/argocd.md b/folio_content/content/Techno/Infra/GitOps/argocd.md similarity index 96% rename from folio_content/content/techno/infra/gitops/argocd.md rename to folio_content/content/Techno/Infra/GitOps/argocd.md index c550348..7288f25 100644 --- a/folio_content/content/techno/infra/gitops/argocd.md +++ b/folio_content/content/Techno/Infra/GitOps/argocd.md @@ -1,6 +1,6 @@ --- date: 2024-07-16T22:51:00Z -title: "argocd" +title: "ArgoCD" description: "ArgoCD - Declarative GitOps CD for Kubernetes" spec: blog: false diff --git a/folio_content/content/techno/infra/gitops/fluxcd.md b/folio_content/content/Techno/Infra/GitOps/fluxcd.md similarity index 100% rename from folio_content/content/techno/infra/gitops/fluxcd.md rename to folio_content/content/Techno/Infra/GitOps/fluxcd.md diff --git a/folio_content/content/techno/infra/kube/helm.md b/folio_content/content/Techno/Infra/Kube/helm.md similarity index 100% rename from folio_content/content/techno/infra/kube/helm.md rename to folio_content/content/Techno/Infra/Kube/helm.md diff --git a/folio_content/content/techno/infra/kube/index.md b/folio_content/content/Techno/Infra/Kube/index.md similarity index 100% rename from folio_content/content/techno/infra/kube/index.md rename to folio_content/content/Techno/Infra/Kube/index.md diff --git a/folio_content/content/techno/infra/kube/k3s.md b/folio_content/content/Techno/Infra/Kube/k3s.md similarity index 100% rename from folio_content/content/techno/infra/kube/k3s.md rename to folio_content/content/Techno/Infra/Kube/k3s.md diff --git a/folio_content/content/techno/infra/kube/microk8s.md b/folio_content/content/Techno/Infra/Kube/microk8s.md similarity index 97% rename from folio_content/content/techno/infra/kube/microk8s.md rename to folio_content/content/Techno/Infra/Kube/microk8s.md index a991cd2..66b3170 100644 --- a/folio_content/content/techno/infra/kube/microk8s.md +++ b/folio_content/content/Techno/Infra/Kube/microk8s.md @@ -1,6 +1,6 @@ --- date: 2024-07-16T22:51:00Z -title: "microk8s" +title: "Microk8s" description: "MicroK8S - Canonical Kubernetes" spec: blog: false diff --git a/folio_content/content/techno/infra/ansible.md b/folio_content/content/Techno/Infra/ansible.md similarity index 100% rename from folio_content/content/techno/infra/ansible.md rename to folio_content/content/Techno/Infra/ansible.md diff --git a/folio_content/content/techno/language/back/c++.md b/folio_content/content/Techno/Language/Back/c++.md similarity index 100% rename from folio_content/content/techno/language/back/c++.md rename to folio_content/content/Techno/Language/Back/c++.md diff --git a/folio_content/content/techno/language/back/csharp.md b/folio_content/content/Techno/Language/Back/csharp.md similarity index 100% rename from folio_content/content/techno/language/back/csharp.md rename to folio_content/content/Techno/Language/Back/csharp.md diff --git a/folio_content/content/techno/language/back/golang.md b/folio_content/content/Techno/Language/Back/golang.md similarity index 100% rename from folio_content/content/techno/language/back/golang.md rename to folio_content/content/Techno/Language/Back/golang.md diff --git a/folio_content/content/techno/language/back/java.md b/folio_content/content/Techno/Language/Back/java.md similarity index 100% rename from folio_content/content/techno/language/back/java.md rename to folio_content/content/Techno/Language/Back/java.md diff --git a/folio_content/content/techno/language/back/node.md b/folio_content/content/Techno/Language/Back/node.md similarity index 100% rename from folio_content/content/techno/language/back/node.md rename to folio_content/content/Techno/Language/Back/node.md diff --git a/folio_content/content/techno/language/back/php.md b/folio_content/content/Techno/Language/Back/php.md similarity index 100% rename from folio_content/content/techno/language/back/php.md rename to folio_content/content/Techno/Language/Back/php.md diff --git a/folio_content/content/techno/language/back/python.md b/folio_content/content/Techno/Language/Back/python.md similarity index 100% rename from folio_content/content/techno/language/back/python.md rename to folio_content/content/Techno/Language/Back/python.md diff --git a/folio_content/content/techno/language/back/rust.md b/folio_content/content/Techno/Language/Back/rust.md similarity index 100% rename from folio_content/content/techno/language/back/rust.md rename to folio_content/content/Techno/Language/Back/rust.md diff --git a/folio_content/content/techno/language/front/javascript.md b/folio_content/content/Techno/Language/Front/javascript.md similarity index 100% rename from folio_content/content/techno/language/front/javascript.md rename to folio_content/content/Techno/Language/Front/javascript.md diff --git a/folio_content/content/techno/language/front/react.md b/folio_content/content/Techno/Language/Front/react.md similarity index 100% rename from folio_content/content/techno/language/front/react.md rename to folio_content/content/Techno/Language/Front/react.md diff --git a/folio_content/content/techno/language/front/svelte.md b/folio_content/content/Techno/Language/Front/svelte.md similarity index 100% rename from folio_content/content/techno/language/front/svelte.md rename to folio_content/content/Techno/Language/Front/svelte.md diff --git a/folio_content/content/techno/language/front/vuejs.md b/folio_content/content/Techno/Language/Front/vuejs.md similarity index 100% rename from folio_content/content/techno/language/front/vuejs.md rename to folio_content/content/Techno/Language/Front/vuejs.md diff --git a/folio_content/content/techno/language/progicielle/index.md b/folio_content/content/Techno/Language/Progicielle/index.md similarity index 100% rename from folio_content/content/techno/language/progicielle/index.md rename to folio_content/content/Techno/Language/Progicielle/index.md diff --git a/folio_content/content/techno/language/index.md b/folio_content/content/Techno/Language/index.md similarity index 100% rename from folio_content/content/techno/language/index.md rename to folio_content/content/Techno/Language/index.md diff --git a/folio_content/content/techno/index.md b/folio_content/content/Techno/index.md similarity index 100% rename from folio_content/content/techno/index.md rename to folio_content/content/Techno/index.md diff --git a/folio_content/content/techno/data/index.md b/folio_content/content/techno/data/index.md deleted file mode 100644 index bcb155f..0000000 --- a/folio_content/content/techno/data/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -date: 2024-09-04T22:51:00Z -title: "Data interactivity" -spec: - blog: false - project: true - doc: true ---- - -## Soon TM diff --git a/libs/back/markdown_struct/src/page_database.rs b/libs/back/markdown_struct/src/page_database.rs index dc64add..80dab5f 100644 --- a/libs/back/markdown_struct/src/page_database.rs +++ b/libs/back/markdown_struct/src/page_database.rs @@ -34,11 +34,14 @@ impl DbFolder { } pub fn add_sub_folder(&mut self, folder: DbFolder) { - self.sub_folders.insert(folder.name.clone(), folder); + self.sub_folders + .insert(folder.name.clone().to_lowercase(), folder); } pub fn get_page(&self, name: &str) -> Option<&Page> { - self.pages.iter().find(|p| p.name == name) + self.pages + .iter() + .find(|p| p.name.to_lowercase() == name.to_lowercase()) } pub fn get_page_in_sub_folder_by_path(&self, path: String) -> Option<&Page> {