To get started with contributing to the lttle documentation, follow the instructions below. If you just want to read the documentation, you can visit the lttle Documentation Website.
This documentation website is built using Docusaurus, a modern static website generator.
- Node.js (version 18 or higher)
- Docker (for local development with TypeSense & TypeSense Scraper)
Just run:
npm installAnd you are good to go.
TypeSense server needs to be started alongside the documentation website for the search functionality to work. This can be done using Docker Compose. The TypeSense Scraper will try to index the documentation website on startup, but fail silently if the website is not yet available. No need to worry about that. More details about the scraper can be found in the Searchable documentation section.
Start the Docker containers:
docker compose up -dRun the local development server:
npm startThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. For more information about Docusaurus, check out the Docusaurus documentation.
To create a local build with local configuration, run:
npm run buildTo create a production build with production configuration, run:
npm run build:prodThese commands generates static content into the build directory and can be served using any static contents hosting service.
Once the build is complete, you can preview it locally by running:
npm run serveThis documentation site is integrated with TypeSense to provide a fast and relevant search experience. The search index is automatically updated whenever the documentation is built.
The documentation website is scraped by a TypeSense DocScraper that runs in a separate container alongside the documentation website.
This scraper needs to be manually triggered to re-scrape the documentation website whenever there are significant changes to the content. This can be done by restarting the scraper container.
Once the scraper has finished its job, the TypeSense server will have an up-to-date index of the documentation content, which can be searched using the search bar in the top right corner of the website. You may also see changes to the ./docker/typesense-scraper-config.json file, which contains the configuration for the scraper. The nbHits field in this file indicates the number of documents indexed by TypeSense.
You can run local scraping using:
npm run scrapeOr by restarting the scraper container:
docker compose restart typesense-scraperNote, for production deployments, the scraper is configured with the typesense-scraper.production.config.json file, which is located in the ./docker directory.
By default, the documentation website is configured to be deployed using Lttle, a serverless platform for deploying applications and services. The deployment configuration is defined in the lttle directory.
Check the Deployment Guide for more details.
For more details, check the Testing Guide.