Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

[WIP] Articles system without a backend #15

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Site web du SDD

<p align="center">
Fabriqué avec <br>
<img src="https://cdn.rawgit.com/hexojs/logo/master/hexo-logo-avatar.png" width="25%"/>
<img src="https://cdn.rawgit.com/vuejs/art/master/logo.png" width="25%"/>
</p>

Expand Down
3 changes: 3 additions & 0 deletions articles/hello-world/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Hello, world!

It's a body with some *italic* and **bold** text.
19 changes: 19 additions & 0 deletions articles/hello-world/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export const title = "Hello, world!";

export const uri = "hello-world";

export const creationDate = new Date(2020, 1, 20, 23);

export const updateDate = new Date(2020, 1, 20, 23, 10);

export const authors = [
"LightDiscord"
];

export const tags = [
"SDD"
];

export const bgImage = require('../../src/img/article-bg.png');

export const fetchContent = () => import('./README.md');
7 changes: 7 additions & 0 deletions articles/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as HelloWorld from './hello-world';

export const articles = [
HelloWorld
];

export const findByUri = (uri) => articles.find(article => article.uri == uri);
8 changes: 8 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build]
command = "npm run build"
publish = "dist"

[[redirects]]
from = "/*"
to = "/index.html"
status = 200
Loading