Small changes and fix zooming
This commit is contained in:
parent
c69bb0d614
commit
329685a4ee
16 changed files with 823 additions and 202 deletions
|
|
@ -298,16 +298,12 @@ async fn main() -> anyhow::Result<()> {
|
|||
|
||||
let poi_category_groups = poi_data.category_groups()?;
|
||||
|
||||
// Read index.html at startup for crawler OG injection (only when --dist is provided)
|
||||
let index_html = if let Some(ref dist) = cli.dist {
|
||||
let index_path = dist.join("index.html");
|
||||
let html = std::fs::read_to_string(&index_path)
|
||||
.with_context(|| format!("Failed to read {}", index_path.display()))?;
|
||||
info!("Loaded index.html for OG injection");
|
||||
Some(html)
|
||||
let is_dev = if cli.dist.is_some() {
|
||||
info!("Static frontend serving enabled");
|
||||
false
|
||||
} else {
|
||||
info!("No --dist provided; static serving and OG injection disabled");
|
||||
None
|
||||
info!("No --dist provided; static serving disabled");
|
||||
true
|
||||
};
|
||||
|
||||
let http_client = reqwest::Client::builder()
|
||||
|
|
@ -406,8 +402,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
features_response,
|
||||
screenshot_url: cli.screenshot_url,
|
||||
public_url: cli.public_url,
|
||||
is_dev: index_html.is_none(),
|
||||
index_html,
|
||||
is_dev,
|
||||
http_client,
|
||||
pocketbase_url: cli.pocketbase_url,
|
||||
pocketbase_admin_email: cli.pocketbase_admin_email,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue