feat: add favicon and add plausible

This commit is contained in:
Kasper Juul Hermansen 2023-04-03 22:27:24 +02:00
parent 079a076925
commit 502b9023d3
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
6 changed files with 665 additions and 277 deletions

927
Cargo.lock generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
dagger-sdk = "0.2.19" dagger-sdk = "0.2.20"
eyre = "0.6.8" eyre = "0.6.8"
color-eyre = "0.6.2" color-eyre = "0.6.2"
tokio = { version = "1.27.0", features = ["full"] } tokio = { version = "1.27.0", features = ["full"] }

View File

@ -1,7 +1,7 @@
#[tokio::main] #[tokio::main]
async fn main() -> eyre::Result<()> { async fn main() -> eyre::Result<()> {
let _ = dotenv::dotenv(); let _ = dotenv::dotenv();
let rust_image = "rustlang/rust:nightly"; let rust_image = "docker.io/rustlang/rust:nightly";
let client = dagger_sdk::connect().await?; let client = dagger_sdk::connect().await?;
@ -178,7 +178,7 @@ async fn main() -> eyre::Result<()> {
let update_deployment = client let update_deployment = client
.container() .container()
.from("kasperhermansen/update-deployment:1680472594") .from("docker.io/kasperhermansen/update-deployment:1680548342")
.with_env_variable("GIT_USERNAME", "kjuulh") .with_env_variable("GIT_USERNAME", "kjuulh")
.with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap()) .with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap())
.with_exec(vec![ .with_exec(vec![

View File

@ -1,3 +1,5 @@
use std::path::PathBuf;
use domain::{Event, Image}; use domain::{Event, Image};
use inquire::validator::ValueRequiredValidator; use inquire::validator::ValueRequiredValidator;
use regex::Regex; use regex::Regex;
@ -89,7 +91,10 @@ async fn generate_article() -> eyre::Result<()> {
description.unwrap_or("".into()) description.unwrap_or("".into())
); );
tokio::fs::write(format!("articles/events/{}.md", slug), contents).await?; let mut vault_path = PathBuf::from(std::env::var("BITEME_ROOT").unwrap());
vault_path.push(format!("areas/food/events/{}.md", slug));
tokio::fs::write(vault_path, contents).await?;
Ok(()) Ok(())
} }

View File

@ -13,6 +13,8 @@ pub fn App(cx: Scope) -> impl IntoView {
<Stylesheet id="leptos" href="/pkg/ssr_modes.css" /> <Stylesheet id="leptos" href="/pkg/ssr_modes.css" />
<Title text="Bitebuds" /> <Title text="Bitebuds" />
<script defer="true" data-domain="bitebuds.front.kjuulh.io" src="https://plausible.front.kjuulh.io/js/script.js"/>
<Router> <Router>
<div class="app grid lg:grid-cols-[25%,50%,25%] sm:grid-cols-[10%,80%,10%] grid-cols-[5%,90%,5%]"> <div class="app grid lg:grid-cols-[25%,50%,25%] sm:grid-cols-[10%,80%,10%] grid-cols-[5%,90%,5%]">
<main class="main col-start-2"> <main class="main col-start-2">