This repository contains the content of the PEcAn Project website.
This README is written for members of the PEcAn Project community who wish to add content to or otherwise modify the website. The website is built using Docusaurus 2, a modern static website generator. The Docusaurus Documentation provides details on maintaining the website; this README is not intended to replace the Docusaurus documentation. Rather, it is intended to provide a brief introduction to common tasks as well as project specific information.
This site was created by Eshan Tripathi with mentorship from Prakher Prashank as part of GSoC '21.
This section will help one to setup the project for local development.
This project has been built using Docusaurus 2, which requires Node version >=12.13.0, you can check this using node -v
. Install node.
Make sure yarn is installed. Install yarn.
yarn install
yarn 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.
yarn build
This command generates static content into the build
directory and can be served using any static contents hosting service.
This describes how to add or modify the Website's content.
Feature Cards on the website homepage highlight the key features of the PEcAn Project.
To modify the feature cards-
src/components/HomepageFeatures.js
const FeatureList
inside HomepageFeatures.js
Every item inside the FeatureList
array contains a JavaScript object enclosed {}
and separated by ,
.
Each of these objects is a feature that is displayed on the homepage and contains a title
, Svg
and description
.
You can edit or remove feature cards and the changes will be reflected after the code passes build test.
If you are adding or editing an image file, the image file must is present inside static/img
directory, otherwise the compiler would return an error.
You should use SVG images when available.
The people page contains details of the PEcAn team. The image here is a representation of how the page should look like with placeholder values.
const contributors = [
{
name: "John Doe",
email: "abc@xyz.com",
role: "Lead PEcAn Developer",
education: "PhD at MIT, USA",
img: "https://previews.123rf.com/images/stockbroker/stockbroker1710/stockbroker171000524/89639450-portrait-of-a-young-smiling-professional-man-arms-crossed.jpg",
},
];
To add and modify information move to the static/utils/contributors.js
file.
It contains an array called contributors
which contains JavaScript objects which are enclosed by {}
and contain following fields-
To add a contributor:
,
.static/img/people
The new contributor and / or any changes will appear on the website automatically after changes are successfully merged into the main branch.
A link to blog posts can be found in the navigation menue at the top of the website.
The Docusaurus blog feature is described in detail in the Docusaurus documentation.
By default when someone clicks on blog
link they will be directed to a page containing list of all present blogs on the website.
Steps to add a blog post:
blog/yyyy-mm-dd-title.md
title
, authors
and tags
yaml fields.
blog/authors.yml
add them as a new entry. static/img/
and referenced using a relative path static/img/myimage.png
yarn build
and yarn start
Here is an example of the blog header:
---
title: GSoC '21 Report- Webpage Updates
author: eshan_tripathi
tags: [gsoc, gsoc21]
---
This section contains screenshots of website's homepage in light and dark theme.
This is an open source project and contributions are what make an open source community. Everyone is welcome to contribute to this project. All involved are expected to follow the PEcAn code of conduct and contribute to a positive and inclusive environment.
First time contributors are welcome. Contributions can be very simple, make sure to check out beginner friendly issues, if present.
This section contains future plans for the website. New contributors can use this section as a reference for planning their contributions.
At present the PEcAn's documentation is being served from (https://pecanproject.github.io/pecan-documentation/master/) using an iframe. While this saves a lot of overhead in converting Rmd files in (https://github.com/PecanProject/pecan/tree/develop/book_source) to md files so that docusaurus could render them, it also increases the loading time for documentation, it also looks less consistent. In future, it is suggested to find an optimised way to convert rmd files to md and integrate them via docusaurus's native documentation parser.
The tutorials section from old site need to be migrated into the new site. One can find tutorials here (https://github.com/PecanProject/pecan/tree/develop/documentation/tutorials).