import freeflowuniverse.webcomponents.preprocessor import freeflowuniverse.webcomponents.tailwind import vweb import os pub struct App { vweb.Context } fn main() { cp_all('${dir(@FILE)}/content', '${dir(@FILE)}/tmp_content', true)! preprocessor.preprocess('${os.dir(@FILE)}/content')! rmdir_all('public')! rmdir_all('static/css')! execute('./tailwindcss -i css/index.css -o ./static/css/index.css --minify') execute('zola build') execute('rsync -a ${dir(@FILE)}/tmp_content/ ${dir(@FILE)}/content/') rmdir_all('${dir(@FILE)}/tmp_content')! mut app := App{} app.mount_static_folder_at('${dir(@FILE)}/public', '/') vweb.run(&app, 8089) } pub fn (mut app App) index() vweb.Result { return app.html(read_file('./public/index.html') or { panic(err) }) }