A blog by Akshara A and Mameru Carr
There are 2 ways you can add articles:
For both of these methods, doing changes directly in main
branch will suffice for now. Note that
once changes are commited and pushed to main
they will be deployed automatically.
md
file in a Markdown editor of your choice (say, Obsidian). Or write it directly in a mdx
file in a code editor (say, VS Code).
md
file before uploading change the extension to mdx
src/pages/articles
src/stores/articles.ts
and add metadata information about the articles (see below).
.mdx
. For example, if the file was named HelloWorld.mdx
you will use HelloWorld
as key in articles.ts
completed
it will automatically show up in /articles
page.md
or mdx
file (say, HelloWorld.mdx
):
# Hello World
This is the article!
2. Upload the file to `src/pages/articles` using GitHub or Git (make sure it has `mdx` extension).
3. Add Metadata to `src/stores/articles.ts`. Since filename was `HelloWorld.mdx` the key is `HelloWorld`:
```ts
import articleStatusEnum from "./ArticleStatusEnum";
state: () => ({
articles: {
'HelloWorld': {
title: 'Hello, World!',
status: articleStatusEnum.Completed,
description: 'Testing only',
authors: [Authors.Akshara, Authors.Mameru],
tags: ['Reference', 'Software Architecture'],
category: 'Architecture',
date: new Date(2024, 9, 30)
},
}
})
import {VCodeBlock} from "@wdns/vue-code-block";
You can use any component in MDX! <VCodeBlock code={'console.log("Hello, World!")'} browserWindow={true} label="Hello, World!" lang={'javascript'} />
## Format