proxy.golang.org : github.com/abiosoft/mold
Package mold provides a web page rendering engine that combines layouts and views for HTML output. The core component of this package is the Engine, which manages the rendering process. Layouts define the top-level structure, such as headers, footers, and navigation. Inside a layout, calling "render" without an argument inserts the view's content into the layout's body. To render a specific section, pass the section's name as an argument. Views are templates that generate the content that is inserted into the body of layouts. Typically what you would put in the "<body>" tag of an HTML page. The path to the view file is passed to the rendering engine to produce HTML output. Sections allow content to be rendered in specific parts of the layout. They are defined within views with a "define" block. The default layout is able to render HTML content within the "<head>" tag by utilising the "head" section. Partials are reusable template snippets that allow you to break down complex views into smaller, manageable components. They are supported in both views and layouts with the "partial" function. Partials are ideal for sharing common logic across multiple views and layouts. An optional second argument allows customizing the data passed to the partial. By default, the view's data context is used.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/abiosoft/mold
License: Apache-2.0
Latest release: 29 days ago
Namespace: github.com/abiosoft
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/abiosoft, https://buymeacoffee.com/abiosoft
Last synced: 29 days ago