diff --git a/README.md b/README.md index acb630b..8c693f9 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,13 @@ Clone both repositories as siblings so the engine can discover the frontend: ``` texrra/ - engine/ # this repository: Rust engine and HTTP server - web/ # texrra-web: static editor frontend + texrra-engine/ # this repository: Rust engine and HTTP server + texrra-web/ # texrra-web: static editor frontend ``` The server resolves the frontend from `TEXRRA_WEB_DIR` when set, otherwise from -`../web` and then `./web`. It serves `index.html`, `styles.css`, `app.js`, and +a sibling `web` or `texrra-web` directory (`./web`, `./texrra-web` and their +`../` forms). It serves `index.html`, `styles.css`, `app.js`, and `favicon.svg`; preview font faces are generated by the engine at `/fonts.css` and `/fonts/*.ttf`. diff --git a/docs/STATUS.md b/docs/STATUS.md index 7c853ba..a9a9702 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -2,7 +2,7 @@ The project is split into two repositories: `texrra-engine` (this Rust engine and HTTP server) and `texrra-web` (the static editor frontend). The engine -discovers the frontend through `TEXRRA_WEB_DIR`, `../web`, or `./web`. +discovers the frontend through `TEXRRA_WEB_DIR`, or a sibling `web` / `texrra-web` directory. Rust-native, Typst-inspired incremental LaTeX engine. No external XeLaTeX is invoked. The live server keeps compiled documents cached and only rebuilds when diff --git a/src/main.rs b/src/main.rs index 2b30005..8fc1a46 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,7 +66,7 @@ fn run() -> Result<(), String> { match &web_root { Some(path) => println!("Serving the web frontend from {}", path.display()), None => println!( - "warning: no web frontend found; clone texrra-web and set TEXRRA_WEB_DIR to its directory" + "warning: no web frontend found; clone texrra-web next to this checkout, or set TEXRRA_WEB_DIR to its directory" ), } @@ -273,7 +273,12 @@ fn find_web_root() -> Result, String> { } return Ok(Some(path)); } - for candidate in [Path::new("../web"), Path::new("web")] { + for candidate in [ + Path::new("../web"), + Path::new("web"), + Path::new("../texrra-web"), + Path::new("texrra-web"), + ] { if candidate.join("index.html").is_file() { return Ok(Some(candidate.to_path_buf())); }