♻️ refactor article links, cards, and recent articles partials

This commit is contained in:
Nuno Coração
2022-12-31 15:58:20 +00:00
parent 963310a713
commit 6bccf5c7d9
25 changed files with 119 additions and 119 deletions

View File

@@ -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

View File

@@ -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.