mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
♻️ refactor article links, cards, and recent articles partials
This commit is contained in:
@@ -35,7 +35,7 @@ As long as you follow this simple practice, you will always be able to update th
|
||||
|
||||
Hugo has various builtin methods to resize, crop and optimize images.
|
||||
|
||||
As an example - in `layouts/partials/article-link-card.html`, you have the following code:
|
||||
As an example - in `layouts/partials/article-link/card.html`, you have the following code:
|
||||
|
||||
```go
|
||||
{{ with .Fill "600x600" }}
|
||||
@@ -170,7 +170,7 @@ In order to take advantage of the default configuration, your project should loo
|
||||
│ └── _index.md
|
||||
├── layouts # custom layouts for your site
|
||||
│ ├── partials
|
||||
│ │ └── extend-article-link.html
|
||||
│ │ └── extend-article-link/simple.html
|
||||
│ ├── projects
|
||||
│ │ └── list.html
|
||||
│ └── shortcodes
|
||||
|
||||
@@ -66,7 +66,7 @@ To enable the Custom layout, set `homepage.layout = "custom"` in the `params.tom
|
||||
|
||||
With the configuration value set, create a new `custom.html` file and place it in `layouts/partials/home/custom.html`. Now whatever is in the `custom.html` file will be placed in the content area of the site homepage. You may use whatever HTML, Tailwind, or Hugo templating functions you wish to define your layout.
|
||||
|
||||
To include [recent articles](#recent-articles) on the custom layout, use the `recent-articles.html` partial.
|
||||
To include [recent articles](#recent-articles) on the custom layout, use the `recent-articles/main.html` partial.
|
||||
|
||||
As an example, the [homepage]({{< ref "/" >}}) on this site uses the custom layout to allow toggling between the profile and page layouts. Visit the [GitHub repo](https://github.com/nunocoracao/blowfish/blob/main/exampleSite/layouts/partials/home/custom.html) to see how it works.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user