From 5e7da3b8d14428237335084ca5d5d14030e0b8dc Mon Sep 17 00:00:00 2001 From: HGouttebroze <hugues.gouttebrozze@etu.univ-st-etienne.fr> Date: Thu, 8 Jul 2021 14:59:18 +0200 Subject: [PATCH] change javascript dummy page to markdown and explain page creation in readme file --- README.md | 10 ++++++++++ src/pages/dummy_page.js | 23 ----------------------- src/pages/dummy_page.md | 8 ++++++++ 3 files changed, 18 insertions(+), 23 deletions(-) delete mode 100644 src/pages/dummy_page.js create mode 100644 src/pages/dummy_page.md diff --git a/README.md b/README.md index 231a499..0496135 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,13 @@ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy ``` If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. + +## Create a new page + +We have two different ways to create a new page, in JavaScript, or, in Markdown: + +- If we don't need a specific layout, we recommend to create a page in Markdown, with `.md` extention. +- If we need to specific layout, create a page in JavaScript with `.js` extention. + +This offers a better return on investment because the Markdown (`.md`) is faster to do. + diff --git a/src/pages/dummy_page.js b/src/pages/dummy_page.js deleted file mode 100644 index 9a2f844..0000000 --- a/src/pages/dummy_page.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react"; -import Layout from "@theme/Layout"; - -function Dummy() { - return ( - <Layout title="Bonjour"> - <div - style={{ - display: "flex", - justifyContent: "center", - alignItems: "center", - height: "50vh", - fontSize: "20px", - }}> - <p> - Editez <code>pages/dummy.js</code> et sauvegardez pour recharger. - </p> - </div> - </Layout> - ); -} - -export default Dummy; diff --git a/src/pages/dummy_page.md b/src/pages/dummy_page.md new file mode 100644 index 0000000..728f2e1 --- /dev/null +++ b/src/pages/dummy_page.md @@ -0,0 +1,8 @@ +--- +title: dummy +description: page factice +--- + +# Page factice + +Page factice penser à créer une vraie page ! -- GitLab