Halo 2.0 Theme base on Astro and Thymeleaf(Experimental)
The theme-astro-starter (Experimental) is a template for quickly starting a project based on Astro and Thymeleaf. It is currently in the experimental and exploratory stage. Astro is used as a static site generator (SSG) rendering framework for component encapsulation, page organization, static page generation, and static resource building. Thymeleaf is used as a backend page rendering framework and is responsible for rendering data on pages. The syntax of Thymeleaf is based on HTML element attributes, so it theoretically does not disrupt the structure of HTML. This allows for binding Halo’s data and pages within Astro components. This enables development independent of Halo’s backend, allowing for hot module replacement (hmr) during the development process, and direct use by Halo after building. Thanks to the Astro framework, modern frontend technologies such as Vue, React, Svelte, and others can be used to develop pages. Hmr can be implemented in the development environment. After building the pages, the resource addresses of the build artifacts will be automatically processed and converted into syntax recognized by Thymeleaf. The final build artifacts can be accessed directly through HTML or deployed on any static page server for page preview prototypes. However, since it does not go through Halo for data binding, the pages will not be populated.
To install the theme-astro-starter, follow these steps:
git clone [repository_url]
cd theme-astro-starter
npm install
npm run dev
The theme-astro-starter is an experimental template that allows developers to quickly start a project using Astro and Thymeleaf. It leverages the benefits of Astro’s modern frontend technology stack and supports easy integration with Thymeleaf’s backend rendering. The template provides features such as hot module replacement (hmr) during development and the generation of static pages that can be accessed directly or deployed on a static page server. However, it should be noted that the pages generated by the template do not have data populated since they do not go through Halo for data binding. Overall, the theme-astro-starter offers a convenient starting point for building websites with Astro and Thymeleaf.