Skip to content

Commit

Permalink
feat: add performance recommendations to the docs (#231)
Browse files Browse the repository at this point in the history
* feat: add performance recommendations to the docs

* refactor: grammar
  • Loading branch information
Zalaras authored Sep 26, 2024
1 parent 8582d4c commit d32d1fb
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ presidium-hugo
presidium
dist/
.DS_Store
resources/

dist/
14 changes: 14 additions & 0 deletions docs/content/best-practices/general-performance-guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: General Performance Guidelines
weight: 7
---

For Presidium to support the functionality it has built on top of Hugo there are some performance considerations to take into account so that build times can remain reasonable. Below are some steps that can be taken to help with overall build performance:

- Keep total markdown content to 50MB or less, this should result in a build time of around one minute, but this cannot be guaranteed due to other factors

- Content spread across multiple files is more performant that having fewer files with more content

- Less content per markdown file is encouraged, this also supports Presidium's philosophy of small micro-articles

- While project dependent multiple directories with single a `_index.md` file has better build performance
4 changes: 2 additions & 2 deletions docs/content/reference/markdown/side-by-side-conten.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Side By Side Content
weight: 10
---

A shortcode is available (`{{% sidebyside %}}`) in order to have content, within a single file, in two different columns that are side by side.
A shortcode is available (`{{%/* sidebyside */%}}`) in order to have content, within a single file, in two different columns that are side by side.

Create side-by-side content by using the following:

Expand All @@ -19,4 +19,4 @@ Content you want on the right hand side of the site
{{% /sidebyside %}}
```

> **Note**: `--split-content--` is where the content is to be split between left and right. Without this keyword the site will fail to render the two columns correctly
> **Note**: `--split-content--` is where the content is to be split between left and right. Without this keyword the site will fail to render the two columns correctly
2 changes: 1 addition & 1 deletion docs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module presidium

go 1.18

require github.com/spandigital/presidium-theme-website v1.4.4 // indirect
require github.com/spandigital/presidium-theme-website v2.17.13+incompatible // indirect
4 changes: 2 additions & 2 deletions docs/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/spandigital/presidium-theme-website v1.4.4 h1:wydDhPjR59vBKrVPfjHjtkkGHBjvtlv0hZBaPvbVP0U=
github.com/spandigital/presidium-theme-website v1.4.4/go.mod h1:j3bm9aRciRtJxAcI/x57I0iWZqXOjFYYsAxNaSagdQY=
github.com/spandigital/presidium-theme-website v2.17.13+incompatible h1:uzzv1ZZzW8S4LLgJ2h90a31/HAWEdlbqmGTs26qbKQM=
github.com/spandigital/presidium-theme-website v2.17.13+incompatible/go.mod h1:8fTL83SigfxCino9GI0yWCVPuWVdUP7o4wfDVgChJCU=

This file was deleted.

This file was deleted.

0 comments on commit d32d1fb

Please sign in to comment.