diff --git a/app.vue b/app.vue index bc88d49..a599ee3 100644 --- a/app.vue +++ b/app.vue @@ -1,5 +1,5 @@ diff --git a/components/ContentNotFound.vue b/components/ContentNotFound.vue index 6b34dcb..dcbf6dc 100644 --- a/components/ContentNotFound.vue +++ b/components/ContentNotFound.vue @@ -1,10 +1,10 @@ diff --git a/components/Footer.vue b/components/Footer.vue deleted file mode 100644 index db84532..0000000 --- a/components/Footer.vue +++ /dev/null @@ -1,121 +0,0 @@ - - - diff --git a/components/LanguageSwitcher.vue b/components/LanguageSwitcher.vue index a59dc2c..b901183 100644 --- a/components/LanguageSwitcher.vue +++ b/components/LanguageSwitcher.vue @@ -1,4 +1,5 @@ diff --git a/components/VFooter.vue b/components/VFooter.vue new file mode 100644 index 0000000..4ac51f7 --- /dev/null +++ b/components/VFooter.vue @@ -0,0 +1,201 @@ + + + diff --git a/components/Header.vue b/components/VHeader.vue similarity index 81% rename from components/Header.vue rename to components/VHeader.vue index 69775ac..53e334f 100644 --- a/components/Header.vue +++ b/components/VHeader.vue @@ -23,19 +23,10 @@ onUnmounted(() => { + + diff --git a/content/blogs/1.my-first-blog.md b/content/blogs/1.my-first-blog.md new file mode 100644 index 0000000..c3a1334 --- /dev/null +++ b/content/blogs/1.my-first-blog.md @@ -0,0 +1,29 @@ +--- +title: My First Blog +description: A humble subtitle describing the blog in more details, should be written in sentence-case +topic: Blog +category: Category +authors: + - name: Contributor 1 + avatar: contrib_1.png + - name: Contributor 2 + avatar: contrib_2.png +tags: + - blog + - diary + - example +updatedAt: 2022-11-18T11:37:49.432Z +createdAt: 2022-11-18T11:37:49.432Z +--- + +## A Great Start + +It was a cold morning. I woke up at 6 o'clock sharp and get ready for hiking. After having the scrumptious French croissant along with a cup of exhilirating iced Americano for my breakfast, I stepped out my house with a strikingly palpable, overzealous mood and energy, ready to pulverize any bold obstacles that dares to get in my way. + +## Indelible Memories + +It was an incredible and wholesome experience to witness the majestic golden rays in the serene sky that intensifies as the sun rose higher in the sky. It was truly a sight to behold. Topping it up with the chilly breeze embracing my warm body as it flows through, I felt invigorating and overjoyed to say the least. + +## An Anecdotal Incident + +While I was making my way through the hilltop, I came across a wild black panther sleeping soundly beside the crystal-clear river, shimmering with dazzling sparkles. It was surreal and I managed to capture some photo of the beast before continuing my journey. diff --git a/content/blogs/1.my-third-blog.md b/content/blogs/1.my-third-blog.md deleted file mode 100644 index 83fea97..0000000 --- a/content/blogs/1.my-third-blog.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: My Third Blog -description: A humble subtitle describing the blog in more details, should be written in sentence-case -topic: Blog -category: Category -authors: - - name: Contributor 1 - avatar: contrib_1.png - - name: Contributor 2 - avatar: contrib_2.png -tags: - - blog - - diary - - example -updatedAt: 2022-11-18T11:37:49.432Z -createdAt: 2022-11-18T11:37:49.432Z ---- - -## A Short Morning - -It was a cold morning. I woke up at 6 o'clock sharp and get ready for hiking. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. - -## Indelible Memories - -It was so cool to see the sunrise on top of the mountain. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. diff --git a/content/blogs/2.my-first-blog.md b/content/blogs/2.my-first-blog.md deleted file mode 100644 index 229f8f4..0000000 --- a/content/blogs/2.my-first-blog.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: My First Blog -description: A humble subtitle describing the blog in more details, should be written in sentence-case -topic: Blog -category: Category -authors: - - name: Contributor 1 - avatar: contrib_1.png - - name: Contributor 2 - avatar: contrib_2.png -tags: - - blog - - diary - - example -updatedAt: 2022-11-18T11:37:49.432Z -createdAt: 2022-11-18T11:37:49.432Z ---- - -## A Long Morning - -It was a cold morning. I woke up at 6 o'clock sharp and get ready for hiking. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. - -## Indelible Memories - -It was so cool to see the sunrise on top of the mountain. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. diff --git a/content/blogs/2.my-second-blog.md b/content/blogs/2.my-second-blog.md new file mode 100644 index 0000000..ac3cc1c --- /dev/null +++ b/content/blogs/2.my-second-blog.md @@ -0,0 +1,33 @@ +--- +title: My Second Blog +description: A humble subtitle describing the blog in more details, should be written in sentence-case +topic: Blog +category: Category +authors: + - name: Contributor 1 + avatar: contrib_1.png + - name: Contributor 2 + avatar: contrib_2.png +tags: + - blog + - diary + - example +updatedAt: 2022-11-18T11:37:49.432Z +createdAt: 2022-11-18T11:37:49.432Z +--- + +## An Irksome Morning + +Today is yet another working day but I am excited to work in the office as I am a semi-workaholic that has a lot to take care of today. + +I went to the nearest bus station from my dwelling place as usual to commute to my office. I was waiting patiently in the bus stop along with other overbearing peasants. + +I waited for a staggering 9 minutes and the bus was nowhere to be seen and it really gets on my nerves. I am starting to get irritated and hallucinating because of this. + +## It Does Not End There + +Finally, after a whole minute later, I finally saw the bus bellowing down the road. In the symphony of emotions, my heart soared with breathtaking ardor, its rhythm racing like a thousand celestial stallions unleashed upon a moonlit gallop as the bus drove nearer and nearer. I am sweating with excitement, and my sickening body healed at an instant. + +The moment when the bus stopped in front of me, I was flabbergasted and stunned. I couldn't feel my breath anymore and starts to comtemplate about my mixed feelings towards the arrival of the bus. + +After regaining my conciousness, I realised that the bus and the fellow peasants has long been gone. "Can like that one meh," I chided. diff --git a/content/blogs/3.my-second-blog.md b/content/blogs/3.my-second-blog.md deleted file mode 100644 index 722b657..0000000 --- a/content/blogs/3.my-second-blog.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: My Second Blog -description: A humble subtitle describing the blog in more details, should be written in sentence-case -topic: Blog -category: Category -authors: - - name: Contributor 1 - avatar: contrib_1.png - - name: Contributor 2 - avatar: contrib_2.png -tags: - - blog - - diary - - example -updatedAt: 2022-11-18T11:37:49.432Z -createdAt: 2022-11-18T11:37:49.432Z ---- - -## A Ok Morning - -It was a cold morning. I woke up at 6 o'clock sharp and get ready for hiking. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. - -## Indelible Memories - -It was so cool to see the sunrise on top of the mountain. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. diff --git a/content/blogs/3.my-third-blog.md b/content/blogs/3.my-third-blog.md new file mode 100644 index 0000000..8624c2c --- /dev/null +++ b/content/blogs/3.my-third-blog.md @@ -0,0 +1,55 @@ +--- +title: My Third Blog +description: A humble subtitle describing the blog in more details, should be written in sentence-case +topic: Blog +category: Category +authors: + - name: Contributor 1 + avatar: contrib_1.png + - name: Contributor 2 + avatar: contrib_2.png +tags: + - blog + - diary + - example +updatedAt: 2022-11-18T11:37:49.432Z +createdAt: 2022-11-18T11:37:49.432Z +--- + +## A Scary Morning + +It was 5am in the morning. I woke up from the abyss of a haunting dream, trembling with fear, my senses electrified by the lingering echoes of terror. With every breath, my chest heaved, the cadence of my heart pounding against the walls of my ribcage, as if desperately seeking escape from the clutches of the nightmarish realm that had ensnared me. + +I sit up, and sauntered to the washroom. I turned on the tap, relentlessly splashing the freezing water onto my face, trying to calm myself down. I surreptitiously looked into the mirror, aghast. I recalled that I still had yet to complete my programming assignment that will be due this afternoon. + +## It's Just An Easy Assignment + +With the fleetness of a gazelle, I dashed towards my desk, switching on my computer and adding in a final touch to my assignment and submit before it's too late. + +```wenyan +吾有一術。名之曰「埃氏篩」。欲行是術。必先得一數。曰「甲」。乃行是術曰。 + 吾有一列。名之曰「掩」。為是「甲」遍。充「掩」以陽也。 + 除「甲」以二。名之曰「甲半」。 + + 有數二。名之曰「戊」。恆為是。若「戊」不小於「甲半」者乃止也。 + 有數二。名之曰「戌」。恆為是。若「戌」不小於「甲半」者乃止也。 + + 乘「戊」以「戌」。名之曰「合」 + 若「合」不大於「甲」者。 + 昔之「掩」之「合」者。今陰是矣。 + 若非乃止也。 + 加一以「戌」。昔之「戌」者。今其是矣云云。 + 加一以「戊」。昔之「戊」者。今其是矣云云。 + + 吾有一列。名之曰「諸素」。 + 昔之「戊」者。今二是矣。恆為是。若「戊」等於「掩」之長者乃止也。 + 夫「掩」之「戊」。名之曰「素耶」。 + 若「素耶」者充「諸素」以「戊」也。 + 加一以「戊」。昔之「戊」者。今其是矣云云。 + 乃得「諸素」。 +是謂「埃氏篩」之術也。 + +施「埃氏篩」於一百。書之。 +``` + +With the submission of my work out of the place, I heaved a sigh of relief and sank myself into the plush embrace of the sofa, a sanctuary of respite. My weary limbs, burdened with the weight of perseverance, found solace in the cushions as I surrendered to the sheer relief that washed over me. diff --git a/content/fr/blogs/1.my-first-blog.md b/content/fr/blogs/1.my-first-blog.md new file mode 100644 index 0000000..9a9c7e8 --- /dev/null +++ b/content/fr/blogs/1.my-first-blog.md @@ -0,0 +1,29 @@ +--- +title: Mon premier blog +description: Un humble sous-titre décrivant le blog plus en détail, doit être écrit en cas de phrase +topic: Blog +category: Category +authors: + - name: Contributor 1 + avatar: contrib_1.png + - name: Contributor 2 + avatar: contrib_2.png +tags: + - blog + - diary + - example +updatedAt: 2022-11-18T11:37:49.432Z +createdAt: 2022-11-18T11:37:49.432Z +--- + +## Un bon début + +C'était une matinée froide. Je me suis réveillé à 6 heures précises et je me prépare pour la randonnée. Après avoir dégusté le délicieux croissant français accompagné d'une tasse d'Americano glacé exaltant pour mon petit-déjeuner, je suis sorti de chez moi avec une humeur et une énergie étonnamment palpables et trop zélées, prêt à pulvériser tous les obstacles audacieux qui oseraient se mettre en travers de mon chemin. + +## Souvenirs indélébiles + +Ce fut une expérience incroyable et saine d'être témoin des majestueux rayons dorés dans le ciel serein qui s'intensifient à mesure que le soleil s'élève plus haut dans le ciel. C'était vraiment un spectacle à voir. En le complétant avec la brise froide embrassant mon corps chaud alors qu'il coulait à travers, je me sentais revigorant et ravi pour le moins. + +## Un incident anecdotique + +Alors que je traversais le sommet de la colline, je suis tombé sur une panthère noire sauvage qui dormait profondément au bord de la rivière cristalline, scintillante d'étincelles éblouissantes. C'était surréaliste et j'ai réussi à capturer quelques photos de la bête avant de continuer mon voyage. diff --git a/content/fr/blogs/1.my-third-blog.md b/content/fr/blogs/1.my-third-blog.md deleted file mode 100644 index 83fea97..0000000 --- a/content/fr/blogs/1.my-third-blog.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: My Third Blog -description: A humble subtitle describing the blog in more details, should be written in sentence-case -topic: Blog -category: Category -authors: - - name: Contributor 1 - avatar: contrib_1.png - - name: Contributor 2 - avatar: contrib_2.png -tags: - - blog - - diary - - example -updatedAt: 2022-11-18T11:37:49.432Z -createdAt: 2022-11-18T11:37:49.432Z ---- - -## A Short Morning - -It was a cold morning. I woke up at 6 o'clock sharp and get ready for hiking. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. - -## Indelible Memories - -It was so cool to see the sunrise on top of the mountain. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. diff --git a/content/fr/blogs/2.my-first-blog.md b/content/fr/blogs/2.my-first-blog.md deleted file mode 100644 index 229f8f4..0000000 --- a/content/fr/blogs/2.my-first-blog.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: My First Blog -description: A humble subtitle describing the blog in more details, should be written in sentence-case -topic: Blog -category: Category -authors: - - name: Contributor 1 - avatar: contrib_1.png - - name: Contributor 2 - avatar: contrib_2.png -tags: - - blog - - diary - - example -updatedAt: 2022-11-18T11:37:49.432Z -createdAt: 2022-11-18T11:37:49.432Z ---- - -## A Long Morning - -It was a cold morning. I woke up at 6 o'clock sharp and get ready for hiking. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. - -## Indelible Memories - -It was so cool to see the sunrise on top of the mountain. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. diff --git a/content/fr/blogs/2.my-second-blog.md b/content/fr/blogs/2.my-second-blog.md new file mode 100644 index 0000000..d63843f --- /dev/null +++ b/content/fr/blogs/2.my-second-blog.md @@ -0,0 +1,33 @@ +--- +title: Mon deuxième blog +description: Un humble sous-titre décrivant le blog plus en détail, doit être écrit en cas de phrase +topic: Blog +category: Category +authors: + - name: Contributor 1 + avatar: contrib_1.png + - name: Contributor 2 + avatar: contrib_2.png +tags: + - blog + - diary + - example +updatedAt: 2022-11-18T11:37:49.432Z +createdAt: 2022-11-18T11:37:49.432Z +--- + +## Une matinée ennuyeuse + +Aujourd'hui est encore une autre journée de travail, mais je suis ravi de travailler au bureau car je suis un semi-bourreau de travail qui a beaucoup à faire aujourd'hui. + +Je suis allé à la gare routière la plus proche de chez moi comme d'habitude pour me rendre à mon bureau. J'attendais patiemment à l'arrêt de bus avec d'autres paysans autoritaires. + +J'ai attendu 9 minutes stupéfiantes et le bus était introuvable et cela m'énerve vraiment. Je commence à m'énerver et à halluciner + +## Ça ne s'arrête pas là + +Enfin, après une minute entière plus tard, j'ai finalement vu le bus mugir sur la route. Dans la symphonie des émotions, mon cœur s'est envolé d'une ardeur époustouflante, son rythme s'emballant comme mille étalons célestes déchaînés au galop au clair de lune alors que le bus se rapprochait de plus en plus. Je transpire d'excitation et mon corps écœurant a guéri en un instant. + +Au moment où le bus s'est arrêté devant moi, j'ai été sidéré et abasourdi. Je ne pouvais plus sentir mon souffle et commençais à réfléchir à mes sentiments mitigés face à l'arrivée du bus. + +Après avoir repris conscience, j'ai réalisé que le bus et les autres paysans avaient disparu depuis longtemps. "Peut aimer celui-là meh," ai-je réprimandé. diff --git a/content/fr/blogs/3.my-second-blog.md b/content/fr/blogs/3.my-second-blog.md deleted file mode 100644 index 722b657..0000000 --- a/content/fr/blogs/3.my-second-blog.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: My Second Blog -description: A humble subtitle describing the blog in more details, should be written in sentence-case -topic: Blog -category: Category -authors: - - name: Contributor 1 - avatar: contrib_1.png - - name: Contributor 2 - avatar: contrib_2.png -tags: - - blog - - diary - - example -updatedAt: 2022-11-18T11:37:49.432Z -createdAt: 2022-11-18T11:37:49.432Z ---- - -## A Ok Morning - -It was a cold morning. I woke up at 6 o'clock sharp and get ready for hiking. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. - -## Indelible Memories - -It was so cool to see the sunrise on top of the mountain. Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi saepe accusamus, ratione, aperiam ipsa odio numquam corrupti quod quas provident voluptatibus eveniet rem beatae commodi. Aspernatur dolor nam laudantium maiores. diff --git a/content/fr/blogs/3.my-third-blog.md b/content/fr/blogs/3.my-third-blog.md new file mode 100644 index 0000000..dfa79f5 --- /dev/null +++ b/content/fr/blogs/3.my-third-blog.md @@ -0,0 +1,55 @@ +--- +title: Mon troisième blog +description: Un humble sous-titre décrivant le blog plus en détail, doit être écrit en cas de phrase +topic: Blog +category: Category +authors: + - name: Contributor 1 + avatar: contrib_1.png + - name: Contributor 2 + avatar: contrib_2.png +tags: + - blog + - diary + - example +updatedAt: 2022-11-18T11:37:49.432Z +createdAt: 2022-11-18T11:37:49.432Z +--- + +## Un matin effrayant + +Il était 5h du matin. Je me suis réveillé de l'abîme d'un rêve obsédant, tremblant de peur, mes sens électrisés par les échos persistants de la terreur. À chaque respiration, ma poitrine se soulevait, la cadence de mon cœur battant contre les parois de ma cage thoracique, comme si je cherchais désespérément à échapper aux griffes du royaume cauchemardesque qui m'avait pris au piège. + +Je m'assois et me dirige vers les toilettes. J'ouvris le robinet, éclaboussant sans relâche l'eau glacée sur mon visage, essayant de me calmer. Je me regardai subrepticement dans le miroir, consterné. J'ai rappelé que je n'avais pas encore terminé mon devoir de programmation qui sera dû cet après-midi. + +## C'est juste une tâche facile + +Avec la rapidité d'une gazelle, je me précipitai vers mon bureau, allumant mon ordinateur et ajoutant une touche finale à mon devoir et le soumettant avant qu'il ne soit trop tard. + +```wenyan +吾有一術。名之曰「埃氏篩」。欲行是術。必先得一數。曰「甲」。乃行是術曰。 + 吾有一列。名之曰「掩」。為是「甲」遍。充「掩」以陽也。 + 除「甲」以二。名之曰「甲半」。 + + 有數二。名之曰「戊」。恆為是。若「戊」不小於「甲半」者乃止也。 + 有數二。名之曰「戌」。恆為是。若「戌」不小於「甲半」者乃止也。 + + 乘「戊」以「戌」。名之曰「合」 + 若「合」不大於「甲」者。 + 昔之「掩」之「合」者。今陰是矣。 + 若非乃止也。 + 加一以「戌」。昔之「戌」者。今其是矣云云。 + 加一以「戊」。昔之「戊」者。今其是矣云云。 + + 吾有一列。名之曰「諸素」。 + 昔之「戊」者。今二是矣。恆為是。若「戊」等於「掩」之長者乃止也。 + 夫「掩」之「戊」。名之曰「素耶」。 + 若「素耶」者充「諸素」以「戊」也。 + 加一以「戊」。昔之「戊」者。今其是矣云云。 + 乃得「諸素」。 +是謂「埃氏篩」之術也。 + +施「埃氏篩」於一百。書之。 +``` + +Avec la soumission de mon travail hors de l'endroit, j'ai poussé un soupir de soulagement et je me suis enfoncé dans l'étreinte moelleuse du canapé, un sanctuaire de répit. Mes membres fatigués, accablés par le poids de la persévérance, ont trouvé du réconfort dans les coussins alors que je m'abandonnais au pur soulagement qui m'envahissait. diff --git a/content/fr/guide.md b/content/fr/guide.md index 4d9eb6a..af4dfc0 100644 --- a/content/fr/guide.md +++ b/content/fr/guide.md @@ -1,55 +1,55 @@ --- -title: Getting Started -description: Everything you need to know to get started with this awesome template +title: Commencer +description: Tout ce que vous devez savoir pour commencer avec ce modèle génial topic: Guide category: Guide authors: - name: Shaun avatar: shaun.png tags: - - tutorial + - didacticiel - guide updatedAt: 2023-11-18T11:37:49.432Z createdAt: 2023-11-18T11:37:49.432Z --- -## Overview +> Remarque: Cette page est traduite à l'aide de Google Traduction -> \[PLACEHOLDER\] This is a French page. +## Aperçu -This template is best used for static sites such as **documentation** and **portfolio showcase** that can be benefited by using Markdown. +Ce modèle est mieux utilisé pour les sites statiques tels que la **documentation** et la **vitrine de portefeuille** qui peuvent bénéficier de l'utilisation de Markdown. -The stack is comprised of Vue.js and Nuxt.js as the core technology for building the template, Nuxt Content for content management and supplemented by Tailwind CSS as the styling library. +La pile est composée de Vue.js et Nuxt.js comme technologie de base pour la création du modèle, Nuxt Content pour la gestion de contenu et complétée par Tailwind CSS comme bibliothèque de style. ## Installation -To get started, clone the project template from GitHub. +Pour commencer, clonez le modèle de projet depuis GitHub. ``` git clone https://github.com/data-miner00/nuxt-content-template.git ``` -Next, install the dependencies with [Pnpm](https://pnpm.io). +Ensuite, installez les dépendances avec [Pnpm](https://pnpm.io). ``` pnpm i ``` -If you want to install with other package managers like [Npm](https://npmjs.com/) or [Yarn](https://yarnpkg.com/), feel free to delete the `pnpm-lock.yaml` and proceed with the package manager of your choice. +Si vous souhaitez installer avec d'autres gestionnaires de packages comme [Npm](https://npmjs.com/) ou [Yarn](https://yarnpkg.com/), n'hésitez pas à supprimer le `pnpm-lock.yaml` et continuez avec le gestionnaire de paquets de votre choix. -After the installation is completed, start the development server by running the `dev` command. +Une fois l'installation terminée, démarrez le serveur de développement en exécutant la commande `dev`. ``` pnpm dev ``` -## Pre-writing +## Pré-écriture -Before writing any articles in the `.md` file, it is advised to add the frontmatter code that describes the article so that it can be used when laying out the individual page. The frontmatter example can be found at `/templates/frontmatter.yml` file. It is essentially an assortment of custom properties that relates to the article. +Avant d'écrire des articles dans le fichier `.md`, il est conseillé d'ajouter le code frontmatter qui décrit l'article afin qu'il puisse être utilisé lors de la mise en page de la page individuelle. L'exemple de frontmatter peut être trouvé dans le fichier `/templates/frontmatter.yml`. Il s'agit essentiellement d'un assortiment de propriétés personnalisées liées à l'article. ```yaml -title: Title of the Article -description: The subtitle describing the title in more details, should be written in sentence-case +title: Titre de l'article +description: Le sous-titre décrivant le titre plus en détail, doit être écrit en casse-phrase topic: Topic category: Category authors: @@ -65,18 +65,18 @@ updatedAt: 2022-11-18T11:37:49.432Z createdAt: 2022-11-18T11:37:49.432Z ``` -The recommended properties are listed as follows: +Les propriétés recommandées sont répertoriées comme suit: -- `title`: The title (h1) of the article/topic. -- `description`: A longer definition that describes the intention and objective of the article. -- `category`: The main topic of the article. -- `tags`: A list of tags that are related to the article. -- `createdAt`: The timestamp of article creation. -- `updatedAt`: The timestamp of article modification. +- `title`: Le titre (h1) de l'article/sujet. +- `description`: Une définition plus longue qui décrit l'intention et l'objectif de l'article. +- `category`: Le sujet principal de l'article. +- `tags`: Une liste de balises liées à l'article. +- `createdAt`: L'horodatage de la création de l'article. +- `updatedAt`: L'horodatage de la modification de l'article. -However, feel free to add in more custom fields that makes most sense to you. +Cependant, n'hésitez pas à ajouter d'autres champs personnalisés qui vous conviennent le mieux. -To access the fields, they can be obtained from the `useAsyncData` composables as follow. +Pour accéder aux champs, ils peuvent être obtenus à partir des composables `useAsyncData` comme suit. ```vue + + +``` -To be added. +Cela garantira que lorsque vous êtes dans le contexte anglais, le lien vous redirigera vers la page normale `/careers` alors que si vous êtes dans le contexte français, il pointera vers `/fr/careers` pour sa version française. diff --git a/content/guide.md b/content/guide.md index cb608ad..a7bc88d 100644 --- a/content/guide.md +++ b/content/guide.md @@ -353,4 +353,119 @@ Lorem [ipsum]{.text-pink-400} dolor sit amet, adispicing elit. ## Internationalization -To be added. +Internationalization is already baked into this template with the help of [Nuxt i18n](https://v8.i18n.nuxtjs.org/). The language switcher component is also provided that allows easy transition between the languages that is available (in this case English and French) seamlessly. + +The url of the non-default locale will be prefixed with it's code whereas the default locale does not require prefixing. + +### Defining Words + +To define a word for the intended languages, there is a section in `nuxt.config.ts` named `vueI18n` within the `i18n` object to define them. For instance, to define the world "welcome" for both English and French, create a property called `welcome` within thier respective locales object inside `messages` with their corresponding value will do. + +```ts [nuxt.config.ts] +export default defineNuxtConfig({ + i18n: { + vueI18n: { + messages: { + en: { + welcome: "Welcome", + }, + fr: { + welcome: "Bienvenue", + }, + }, + }, + }, +}); +``` + +The newly defined word can be used anywhere within the project inside the `templates` tag by interpolating with the `$t` function that takes in the key of the defined word. + +```vue + +``` + +With this in place, Nuxt is smart enough to render out "Welcome" or "Bienvenue" correctly when the language context changed. + +### Locales File Definition + +While the above solution of adding new definition of words in the `nuxt.config.ts` file works, it can pose a real problem when the **vocabulary grows** as the file become cumbersome to maintain. + +Fortunately, there is another preferred way to store the language definitions in their own, seperate JSON file. With this approach, not only it achieves the Single Responsibility Principle, it also drastically improve the maintainability of the files. + +Here is how it is configured in `nuxt.config.ts`. + +```ts [nuxt.config.ts] +export default defineNuxtConfig({ + i18n: { + langDir: "locales", + locales: [ + { + code: "en", + file: "en.json", + }, + { + code: "fr", + file: "fr.json", + }, + ], + }, +}); +``` + +The above code tells Nuxt to locate English definition in `en.json` file and French definition in `fr.json` file inside the `locales` folder. + +### I18n in Nuxt Content + +To support internationalization for Markdown based contents from Nuxt Content, create a corresponsing folder inside the `content` folder with the non-default locale's code and imitate the structure of the base folder. + +For example, given I have the following file structure that has English contents, the French contents can be housed in the following manner. + +From: + +```[Directory Structure] +├─ content +│ ├─ blogs +│ │ ├─ blog1.md +│ │ └─ blog2.md +│ ├─ demo.md +│ └─ guide.md +``` + +To: + +```[Directory Structure] +├─ content +│ ├─ blogs +│ │ ├─ blog1.md (English) +│ │ └─ blog2.md (English) +│ ├─ fr +│ │ ├─ blogs +│ │ │ ├─ blog1.md (French) +│ │ │ └─ blog2.md (French) +│ │ ├─ demo.md (French) +│ │ └─ guide.md (French) +│ ├─ demo.md (English) +│ └─ guide.md (English) +``` + +By doing this, we are utilizing the behaviour of the prefixed URL for non-default locale and it does the trick. Not the most elegant solution but it works for now. + +### Internationalized Links + +To make sure that every links in the website corresponds to its language counterparts, we have to preprocess the links with the `useLocalePath` composable. Here is how it looks like in code. + +```vue + + + +``` + +This will ensures when you are in the English context, the link will redirect you to the normal `/careers` page whereas if you are in the French context, it will points to `/fr/careers` for its French version. diff --git a/locales/en.json b/locales/en.json index 1befb61..9fb3c63 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1,3 +1,59 @@ { - "new": "new" + "homePage": { + "landing": { + "new": "new", + "description_html": "Welcome to the ultimate `.md` template enamored by the green technologies.", + "view_guide": "View Guide", + "clone": "Clone me on GitHub" + }, + "features": { + "markdown": { + "title": "Markdown oriented", + "description": "Articulate, write and publish compositions that matters. Rinse and repeat." + }, + "tailwind": { + "title": "Tailwind included", + "description": "Low level utility-rich styling library at your disposal without naming elements." + }, + "dark_mode": { + "title": "Dark mode", + "description": "Enrich user experience with dark and light mode whichever that suits their appetite." + } + } + }, + "header": { + "home": "Home", + "guide": "Guide", + "demo": "Demo", + "resources": "Resources", + "blogs": "Blogs" + }, + "footer": { + "description": "The ultimate `.md` template powered by green technologies. ", + "sitemap": { + "title": "Sitemap", + "homepage": "Homepage", + "guide": "@:header.guide", + "demo": "@:header.demo", + "resources": "@:header.resources", + "blogs": "@:header.blogs", + "credits": "Credits" + }, + "projects": { + "title": "Projects" + }, + "templates": { + "title": "Templates", + "react_esbuild": "React Esbuild Template", + "react_rescript": "React Rescript Template", + "algorand_react": "Algorand React Template" + }, + "technologies": { + "title": "Technologies" + } + }, + "error": { + "title": "404 Not Found", + "description": "The content does not exist. Please try another one. " + } } diff --git a/locales/fr.json b/locales/fr.json index 3e3faa6..718d6a7 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -1,3 +1,59 @@ { - "new": "nouvelle" + "homePage": { + "landing": { + "new": "nouvelle", + "description_html": "Bienvenue dans le modèle ultime `.md` amoureux des technologies vertes.", + "view_guide": "Voir le guide", + "clone": "Clonez-moi sur GitHub" + }, + "features": { + "markdown": { + "title": "Orienté Markdown", + "description": "Articulez, écrivez et publiez des compositions qui comptent. Rincer et répéter." + }, + "tailwind": { + "title": "Tailwind inclus", + "description": "Bibliothèque de style riche en utilitaires de bas niveau à votre disposition sans nommer les éléments." + }, + "dark_mode": { + "title": "Mode sombre", + "description": "Enrichissez l'expérience utilisateur avec le mode sombre et clair selon ce qui convient à leur appétit." + } + } + }, + "header": { + "home": "Maison", + "guide": "Guide", + "demo": "Démo", + "resources": "Ressources", + "blogs": "Blogs" + }, + "footer": { + "description": "Le modèle `.md` ultime alimenté par des technologies vertes.", + "sitemap": { + "title": "Plan du site", + "homepage": "Page d'accueil", + "guide": "@:header.guide", + "demo": "@:header.demo", + "resources": "@:header.resources", + "blogs": "@:header.blogs", + "credits": "Crédits" + }, + "projects": { + "title": "Les projets" + }, + "templates": { + "title": "Modèles", + "react_esbuild": "Modèle React Esbuild", + "react_rescript": "Modèle React Rescript", + "algorand_react": "Modèle Algorand React" + }, + "technologies": { + "title": "Les technologies" + } + }, + "error": { + "title": "404 Non trouvé", + "description": "Le contenu n'existe pas. Veuillez en essayer un autre." + } } diff --git a/pages/[...slug].vue b/pages/[...slug].vue index 819b293..902e9dd 100644 --- a/pages/[...slug].vue +++ b/pages/[...slug].vue @@ -85,7 +85,7 @@ onBeforeUnmount(() => {
diff --git a/tailwind.config.js b/tailwind.config.js index 6adee7a..d0b8183 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -7,6 +7,7 @@ module.exports = { "./pages/**/*.vue", "./plugins/**/*.{js,ts}", "./nuxt.config.{js,ts}", + "./locales/**/*.json", ], theme: { extend: {},