-
Install NodeJS
apt-get install nodejs -y
-
Install dependencies
npm install
-
Run server
npm run dev
Open http://localhost:8000 with your browser to see the result.
You can start editing the page by modifying src/pages/index.tsx
. The page auto-updates as you edit the file.
The content is to be found within the content directory organised by locale and type of content like pages or components.
This document serves as a guide for developers and editors to maintain and expand the Sovereign Cloud Stack website. It includes information about the folder structure, content management, adding new features, and deploying the site.
- Introduction
- Project Overview
- Prerequisites
- Folder Structure
- Content Management
- Development
- Building and Deployment
- Configuration Files
- Template Types
- Troubleshooting
- Contribution Guidelines
- Contact
The Sovereign Cloud Stack website is built using GatsbyJS. This project is multilingual, supports editorial content in Markdown, and integrates a modern theme for styling.
-
Bilingual Content: Separate directories for English and German content.
-
Markdown-based CMS: All editorial content is stored as Markdown files for easy maintenance and potential future compatibility with DecapCMS.
-
Component-based Architecture: Reusable React components for layout, navigation, and other UI elements.
-
Static Site Generation: Optimized for fast load times and high performance.
Ensure you have the following installed:
- Node.js: v16 or higher
- Yarn: Recommended for dependency management
- Git: For version control
To install dependencies:
npm install
-
/src/components
: React components used across pages (e.g., Footer, TopNavigation). -
/content
: Markdown content for the website, divided into language-specific folders:content/en
: English contentcontent/de
: German content.
-
/templates
: Page templates for different content types like annonucements posts. -
/images
: Static assets, organized by purpose (e.g., authors, backgrounds). -
/gatsby-plugin-theme-ui
: Theme configuration.
To edit the homepage content in German:
/content/de/pages/index.md
-
Navigate to the appropriate language folder under
/content/{locale}/pages
. -
Create a new
.md
file with the following frontmatter:slug: new-page language: en # de for german or en english template: staticPage title: 'Your Page Title'
-
Add the content below the frontmatter.
Markdown will be rendered as html content for the staticPage
template.
-
Create a Markdown file under the appropriate folder
/announcements
. -
Use the corresponding template
announcementsPost
. -
Example frontmatter for an announcement:
postType: announcements slug: announcement-title title: Announcement Title date: '2024-12-24' template: post authors: - name: Foo Bar # - image: '../../../images/authors/foo-bar.webp' language: en # de for german or en english featuredImage: '../../../images/image.png'
- Locate the file under
/content/{language}/pages
. - Edit the content or metadata as needed.
To start the local server:
gatsby develop
Access the website at http://localhost:8000
.
- Add components to
/src/components
. - Update templates in
/src/templates
if the feature requires custom rendering. - Commit your changes with a meaningful message.
To generate a production-ready build:
gatsby build
- Ensure the
gh-pages
branch is up to date. - The page is currently built with the
build_and_deploy.yml
workflow but not yet deployed somewhere which still has to be defined.
The gatsby-config.ts
file defines metadata, plugins, and settings for the Gatsby site.
- Site Metadata: Contains general website info like
title
andsiteUrl
. - Plugins:
gatsby-plugin-react-i18next
: Enables multilingual support.gatsby-transformer-remark
: Converts Markdown files into queryable nodes.gatsby-source-filesystem
: Defines source paths for content and images.
The gatsby-node.ts
file dynamically creates pages using Markdown files.
-
createPages
:- Reads
template
,slug
,language
, andpostType
from Markdown frontmatter. - Maps
template
to corresponding files in/templates/
. - Constructs paths dynamically based on
postType
andslug
.
- Reads
-
createSchemaCustomization
:- Ensures all frontmatter fields have consistent types.
- Defines additional metadata like
authors
orfeaturedImage
.
-
staticPage
:- Used for simple static content.
- Renders the Markdown body without additional layout.
-
announcementsPost
:- Dedicated to time-sensitive announcements.
- Requires structured frontmatter (e.g.,
title
,date
).
-
news.tsx
andindex.tsx
:- Aggregates dynamic content from Markdown files.
- The homepage uses
index.tsx
for a preconfigured structure.
The background animation visually represents the concept described on the landing page: a cloud platform that is connected, standardized, and collaboratively built. The animation reflects this vision through interconnected clouds of particles, symbolizing integration, interoperability, and a dynamic global community.
- Particle Clouds: Configurable clouds with custom colors, sizes, and opacity.
- Dynamic Motion: Smooth particle movement with subtle, noise-like patterns.
- Connection Lines: Lines between particles represent collaboration and connectivity.
- Performance Optimized: Debounced resize handling and throttled frame rates ensure smooth rendering.
The component is implemented in BackgroundAnimation.tsx
and can be integrated into any layout or page.
Code File: src/components/BackgroundAnimation.tsx
import BackgroundAnimation from '../components/BackgroundAnimation';
const Layout = () => {
return (
<>
<BackgroundAnimation />
<div>Website Content Here</div>
</>
);
};
-
Content Not Rendering: Ensure the
template
matches a valid template. -
Build Fails: Check
gatsby-config.ts
for misconfigured plugins.
-
Follow TypeScript conventions.
-
Use descriptive commit messages.
- Create a feature branch.
- Submit a PR with detailed changes.
For questions or support, refer to the repository maintainer.