forked from D-Net/openaire-graph-docs
Serve docs in the landing page
This commit is contained in:
parent
741f6dfb3a
commit
b03bbabb43
30
README.md
30
README.md
|
@ -1,41 +1,31 @@
|
||||||
# Website
|
# Website
|
||||||
|
|
||||||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
This website is built using [Docusaurus 2](https://docusaurus.io/); please check [here](https://docusaurus.io/docs/installation#requirements) the requirements to run the project.
|
||||||
|
|
||||||
|
### Clone repository
|
||||||
|
```
|
||||||
|
$ git clone https://code-repo.d4science.org/D-Net/openaire-graph-docs.git
|
||||||
|
```
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
```
|
```
|
||||||
$ yarn
|
$ npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Local Development
|
### Local Development
|
||||||
|
|
||||||
```
|
```
|
||||||
$ yarn start
|
$ npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||||
|
|
||||||
### Build
|
### Build and deploy
|
||||||
|
|
||||||
```
|
```
|
||||||
$ yarn build
|
$ npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||||
|
|
||||||
### Deployment
|
|
||||||
|
|
||||||
Using SSH:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ USE_SSH=true yarn deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
Not using SSH:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ GIT_USER=<Your GitHub username> 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.
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
slug: /
|
||||||
sidebar_position: 1
|
sidebar_position: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -11,15 +11,15 @@ const config = {
|
||||||
title: 'OpenAIRE Documentation',
|
title: 'OpenAIRE Documentation',
|
||||||
tagline: 'Open Access Infrastructure for Research in Europe',
|
tagline: 'Open Access Infrastructure for Research in Europe',
|
||||||
url: 'http://snf-23385.ok-kno.grnetcloud.net',
|
url: 'http://snf-23385.ok-kno.grnetcloud.net',
|
||||||
baseUrl: '/openaire/',
|
baseUrl: '/', // serve the website at route
|
||||||
onBrokenLinks: 'throw',
|
onBrokenLinks: 'throw',
|
||||||
onBrokenMarkdownLinks: 'warn',
|
onBrokenMarkdownLinks: 'warn',
|
||||||
favicon: 'img/favicon.ico',
|
favicon: 'img/favicon.ico',
|
||||||
|
|
||||||
// GitHub pages deployment config.
|
// GitHub pages deployment config.
|
||||||
// If you aren't using GitHub pages, you don't need these.
|
// If you aren't using GitHub pages, you don't need these.
|
||||||
organizationName: 'schatzopoulos', // Usually your GitHub org/user name.
|
organizationName: 'openaire', // Usually your GitHub org/user name.
|
||||||
projectName: 'openaire-docs', // Usually your repo name.
|
projectName: 'openaire-graph-docs', // Usually your repo name.
|
||||||
|
|
||||||
// Even if you don't use internalization, you can use this field to set useful
|
// Even if you don't use internalization, you can use this field to set useful
|
||||||
// metadata like html lang. For example, if your site is Chinese, you may want
|
// metadata like html lang. For example, if your site is Chinese, you may want
|
||||||
|
@ -35,20 +35,22 @@ const config = {
|
||||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||||
({
|
({
|
||||||
docs: {
|
docs: {
|
||||||
// routeBasePath: '/', // serve the docs at the site's route
|
routeBasePath: '/', // serve the docs at the site's route
|
||||||
|
|
||||||
sidebarPath: require.resolve('./sidebars.js'),
|
sidebarPath: require.resolve('./sidebars.js'),
|
||||||
|
|
||||||
// Please change this to your repo.
|
// Please change this to your repo.
|
||||||
// Remove this to remove the "edit this page" links.
|
// Remove this to remove the "edit this page" links.
|
||||||
// editUrl:
|
// editUrl:
|
||||||
// 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
// 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||||
|
|
||||||
remarkPlugins: [math],
|
remarkPlugins: [ math ],
|
||||||
rehypePlugins: [katex],
|
rehypePlugins: [ katex ],
|
||||||
},
|
|
||||||
blog: {
|
|
||||||
showReadingTime: true,
|
|
||||||
},
|
},
|
||||||
|
blog: false,
|
||||||
|
// {
|
||||||
|
// showReadingTime: true,
|
||||||
|
// },
|
||||||
theme: {
|
theme: {
|
||||||
customCss: require.resolve('./src/css/custom.css'),
|
customCss: require.resolve('./src/css/custom.css'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
|
// this file is renamed so as to serve the docs in the site's route
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import Link from '@docusaurus/Link';
|
import Link from '@docusaurus/Link';
|
||||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
import Layout from '@theme/Layout';
|
import Layout from '@theme/Layout';
|
||||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||||
|
import { Redirect } from '@docusaurus/router';
|
||||||
|
|
||||||
import styles from './index.module.css';
|
import styles from './index.module.css';
|
||||||
|
|
||||||
|
@ -27,6 +30,7 @@ function HomepageHeader() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
// return <Redirect to="/docs" />;
|
||||||
const {siteConfig} = useDocusaurusContext();
|
const {siteConfig} = useDocusaurusContext();
|
||||||
return (
|
return (
|
||||||
<Layout
|
<Layout
|
Loading…
Reference in New Issue