Skip to content

LastLeaf/maomi-introduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Introduction Website Code of maomi

build and run

To build and run in debug mode, execute:

wasm-pack build --target no-modules --dev && cargo run --addr 127.0.0.1:2080

Visit http://localhost:2080 for the website.

To build release, execute:

wasm-pack build --target no-modules && cargo build --release

Language

The language is controlled by MAOMI_I18N_LOCALE environment variable while compilation. Currently available languages:

  • default (English);
  • zh_CN for Simplified Chinese.

Specify MAOMI_I18N_LOCALE= if there is compilation error about missing the translation file.

Server Side Rendering

Server-side rendering is disabled by default.

To enable it, use feature server-side-rendering while compilation.

wasm-pack build --target no-modules --features server-side-rendering && cargo build --release --features server-side-rendering

It seems that there might hit some rust compiler bugs. If so, disable the incremental compilation through CARGO_INCREMENTAL=0 .

Environment Variables

Supported compile-time environment variables:

  • MAOMI_PATH_PREFIX the path prefix in URL, e.g. /maomi/en_US .

About

The Introduction Website Code of maomi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages