This is a basic website template that uses Gatsby and our custom RDF plugin to generate a static website.
- To start developing, simply cd into current folder and start Gatsby in dev mode:
cd my-default-starter/
gatsby develop
-
Then open the source code and start editing!
Your site is now running at
http://localhost:8000
!Note: You'll also see a second link:
http://localhost:8000/___graphql
. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.
A quick look at the top-level files and directories you'll see in a Gatsby project.
.
├── node_modules
├── papers-to-ttl
├── plugins/gatsby-transformer-rdf
├── src/components
├── src/pages
├── src/templates
├── gatsby-config.js
├── gatsby-node.js
└── Dockerfile
-
/node_modules
: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed. -
/papers-to-ttl
: This directory contains supplementary Node.js scripts that convert papers from Bibsonomy API to set of local RDF files. -
/plugins/gatsby-transformer-rdf
: This directory contains our custom Gatsby plugin that transforms RDF to internal Gatsby resources that can be queried using GraphQL. -
/src/components
: This directory contains all of the components used within website, as well as styles and embedded svgs. -
/src/pages
: This directory contains all the base pages markup used in the website. -
/src/templates
: This directory contains all the page templates used to generate pages from data. -
gatsby-config.js
: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the config docs for more detail). -
gatsby-node.js
: This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process. -
Dockerfile
: This file is describes the build process for Docker.
We use Tailwindcss for styling all components.
Component use their own custom classes when they get complex enough (more than 2-3 tailwind helper classes).
Styles for those components are pre-defined using tailwind macro in ./src/components/styles/main.css
.
Looking for more guidance? Full documentation for Gatsby lives on the website. Here are some places to start:
-
For most developers, we recommend starting with our in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.
-
To dive straight into code samples, head to our documentation. In particular, check out the Guides, API Reference, and Advanced Tutorials sections in the sidebar.
The website is deployed using Docker container.
To deploy it locally run the following commands:
yarn build
cp Dockerfile public/
cd public/
docker build -t dice-website .
docker run --name dice-website-instance -p 8080:80 dice-website
The website is being automatically deployed to dice-website.cs.upb.de
VM.
Deployment is carried out using Github Actions and Exoframe.