Getting Started


Download

Get the latest version of Eliza from GitHub:

git clone https://github.com/2460124601/Eliza_doc.git
cd ./Eliza
docker-compose up --build dev

Visit: http://127.0.0.1:8080

This command builds the development container and starts the service.

Initialization

Before starting, create version folders under “content”. Each version can have multiple languages.

Eliza/
├─ content/
│   ├─ v1.0/
│   │   ├─ en/
│   │   └─ zh-TW/
│   └─ v1.4/
│       ├─ en/
│       ├─ zh-TW/
│       └─ jp/

This creates version 1.0 (English, Chinese) and version 1.4 (English, Chinese, Japanese).

Create Documents

If you want to create documents in v1.0/zh-TW, start with an index.md file to introduce your project. Name other files starting with numbers for order, like 04-database.md.

For multi-language support, use the same filename for each language (e.g., both named 04-database.md).

File names don’t affect routes but should be English without spaces.

Required Metadata

Each file needs three fields: title, slug, and order.

---
title: Hello World
slug: hello_word
order: 2
--- 

Example URL: xxx.com/zh-TW/v1.0/02-hello_world.html
Use ASCII characters for slug.

If a slug has no matching translation, it won’t switch properly.

Function Overview

System Workflow

Eliza includes two main scripts for generating and serving docs.

File Function
build.rb Converts Markdown in content/ into HTML.
watch_poll_serve.rb Watches files and rebuilds automatically.

build.rb: Generator

Converts Markdown to HTML and saves output to public/.

Features

watch_poll_serve.rb: Live Preview

Watches changes in content/ and templates, rebuilding every 0.8s using WEBrick (default port 8080).