Lightningjs website, source for Lightningjs information regarding all ecosystems.
Find any problems on the site or mistakes in information? Help us out resolving the problem!
Clone repository and follow these steps;
npm install
npm run docs:dev
You can create blogs by adding markdown files in the blogs
directory.
Make sure the on top of the markdown files you've set the right properties in frontmatter.
---
layout: blog
title: Hello World
description: This is just a test
date: 2023-1-30
author: Me Myself and I
linkImage: '/blogs/myLinkImage' #link image needs to be in site/static folder or remote link
---
http://localhost:4173/blogs/*.md
Blogs layout will automatically sort all the markdown files in the blogs
directory on a single page from newest to oldest by date.
http://localhost:4173/blogs
Most documentation / examples located on this repository will be a combination of Lightning Renderer and Lightning Blits (or other flavors) libraries. Library specific documentation will be maintained on the repository of the library and will be imported the moment the website is being updated.
For the documentation structure for each Library it's important that we use pages to split up the information so it is easier to find, and or linked with others.
In order for the site to import the docs from the other repositories we have a config script named v3-docs.cjs. In this script is a config
object which had a collection of repos. The settings for each repository is an object with the following properties;
{
gitURL: 'https://github.com/lightning-js/repoName'
gitBranch: 'main',
sourceDir: 'docs',
targetDir: 'repoName',
ignoreFiles: ['README.md', '_sidebar.md', '.nojekyll', 'index.html'],
}
Each sourceDir
needs to have a sidebar.json file in which the the structure of the sidebar is defined;
[
{
"text": "Getting Started",
"items": [
{
"text": "Introduction",
"link": "/introduction"
},
{
"text": "Setup",
"link": "/getting_started"
}
]
},
{
"text": "Topic",
"items": [
{
"text": "label",
"link": "/mardownFile"
},
{
"text": "label2",
"link": "/mardownFile2"
}
]
},
]
link
property is a markdownfile path without the .md file specification