Home Articles Books Search About
日本語
Building a Custom Hugo Theme with Tailwind CSS v4 and Submitting to Hugo Themes Gallery

Building a Custom Hugo Theme with Tailwind CSS v4 and Submitting to Hugo Themes Gallery

This post documents the process of migrating a Hugo blog from the PaperMod theme to a custom theme built with Tailwind CSS v4, and submitting it to the official Hugo Themes gallery. Hugo + Tailwind CSS v4 Integration Hugo 0.157+ supports the css.TailwindCSS pipeline. Tailwind v4 uses @import "tailwindcss" syntax and no longer requires tailwind.config.js. /* assets/css/main.css */ @import "tailwindcss"; @theme { --color-primary: #2563eb; --font-sans: "Inter", sans-serif; } @variant dark (&:where(.dark, .dark *)); In templates, call css.TailwindCSS to process the stylesheet: ...

LEAF Writer: CSS Customization

LEAF Writer: CSS Customization

Overview This is a research note on how to customize LEAF Writer. https://gitlab.com/calincs/cwrc/leaf-writer/leaf-writer This article specifically covers CSS-based visual customization. This allows you to set up an editing environment with vertical text display, as shown below. The following shows the display before customization. Method Specify the schema file as follows. https://github.com/kouigenjimonogatari/kouigenjimonogatari.github.io/blob/master/xml/lw/01.xml Specifically: <?xml-stylesheet type="text/css" href="https://kouigenjimonogatari.github.io/lw/tei_genji.css"?> LEAF Writer reads this schema file and changes the editor’s style accordingly. This is not a LEAF Writer-specific feature but is supported by general web browsers as well. ...