MystenLabs / walrus-sites

Walrus Sites: Decentralized Websites using Sui and Walrus.
https://docs.walrus.site/walrus-sites/intro.html
Apache License 2.0
10 stars 7 forks source link

Add support for .webmanifest extension #87

Open kkomelin opened 3 weeks ago

kkomelin commented 3 weeks ago

I'm receiving the following error when I'm trying to publish my site to Walrus Sites:

2024-06-19T07:01:40.620188Z  INFO site_builder: initializing site builder
2024-06-19T07:01:40.620460Z  INFO site_builder: configuration loaded config=Config { portal: "walrus.site", package: 0x514cf7ce2df33b9e2ca69e75bc9645ef38aca67b6f2852992a34e35e9f907f58, general: GeneralArgs { rpc_url: None, wallet: None, walrus_binary: Some("walrus"), walrus_config: None, gas_budget: Some(500000000) } }
2024-06-19T07:01:40.620510Z  INFO site_builder::util: Using wallet configuration from /home/kos/.sui/sui_config/client.yaml
thread 'main' panicked at site-builder/src/site/content.rs:206:18:
Unknown extension webmanifest
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

.webmanifest is a ligit file extension, so I suggest adding it to the whitelist.

mlegner commented 3 weeks ago

Thank you for the report, @kkomelin. Indeed, we need to extend the list of supported file types and implement a (configurable) fallback for unknown/unsupported types.

kkomelin commented 3 weeks ago

Thanks @mlegner. Will try to work around with the .json extension for Web Manifest for now.

giac-mysten commented 3 weeks ago

Hey @kkomelin , thanks for reporting! As @mlegner mentioned, we will be extending the list of supported file types with time. FYI, we currently only support the "Common MIME types" list by mozilla.

kkomelin commented 2 weeks ago

Sure @giac-mysten. No rush with that. I switched to .json for now.