From 1108d7129fa77238dde52973f30fc1d9bccaef9f Mon Sep 17 00:00:00 2001 From: Ihor Aleksandrychiev Date: Tue, 7 Oct 2025 14:42:57 +0300 Subject: [PATCH 1/2] Added missing params to the config.toml Signed-off-by: Ihor Aleksandrychiev --- hugo/config.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hugo/config.toml b/hugo/config.toml index 17e26f971..a22c8f5c8 100644 --- a/hugo/config.toml +++ b/hugo/config.toml @@ -10,11 +10,20 @@ relativeURLs = true [params] branch = "%branch%" +CFE_manuals_version = "%branch%" repositoryUrl = "https://github.com/cfengine/documentation" searchBaseUrl = "/docs/search/%branch%/" searchUrlPrefix = ".." domain = "docs.cfengine.com" +[params.cfengine] +branch = "%branch%" +core_branch = "master" +latest_patch_release = 0 +latest_package_build = "1a" +vagrant_package_build = 1 +masterfiles_branch = "master" + # Number of posts per page [pagination] pagerSize = 10 From 70fcbd65da8e255e6691ca7d2a39286f669caef3 Mon Sep 17 00:00:00 2001 From: Ihor Aleksandrychiev Date: Tue, 7 Oct 2025 14:53:29 +0300 Subject: [PATCH 2/2] Use params shortcode to access global parameters from content Ticket: ENT-13254 Signed-off-by: Ihor Aleksandrychiev --- cheatsheet.markdown | 4 ++-- .../installation-community.markdown | 16 ++++++++-------- .../installation-coreos.markdown | 4 ++-- ...tallation-enterprise-generic-tarball.markdown | 4 ++-- .../installation-enterprise-vagrant.markdown | 8 ++++---- .../installation/upgrading.markdown | 8 ++++---- content/reference/functions/_index.markdown | 2 +- content/release-notes/_index.markdown | 2 +- content/release-notes/known-issues.markdown | 4 ++-- content/resources/faq/manual-execution.markdown | 2 +- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cheatsheet.markdown b/cheatsheet.markdown index 600dd8693..8f4f0cfad 100644 --- a/cheatsheet.markdown +++ b/cheatsheet.markdown @@ -580,7 +580,7 @@ three dashes at the top) or in [\_config.yaml](https://github.com/cfengine/documentation/blob/master/generator/_config.yml) can be used directly within markdown. -For example this is the '{{site.CFE_manuals_version}}' version of the +For example this is the '{{< params "CFE_manuals_version" >}}' version of the documentation. That variable comes from \_config.yaml. Since liquid variables look a lot like mustache variables any time you want to @@ -609,7 +609,7 @@ site.CFE_manuals_version {{ site.CFE_manuals_version }} "sort":"Host name", "filter":{ "CFEngine version":{ - "not_match":"{{site.cfengine.branch}}.0" + "not_match":"{{< params "cfengine.branch" >}}.0" } }, "select":[ diff --git a/content/getting-started/installation/general-installation/installation-community.markdown b/content/getting-started/installation/general-installation/installation-community.markdown index d5a73960b..37960a275 100644 --- a/content/getting-started/installation/general-installation/installation-community.markdown +++ b/content/getting-started/installation/general-installation/installation-community.markdown @@ -24,10 +24,10 @@ It also provides instructions for the following: Once `cf-remote` is installed from the Python Package Index (e.g. `pipx install cf-remote`), execute it against a host (either local or remote). -For example, here we install CFEngine Community {{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}} on two hosts and bootstrap to one of them: +For example, here we install CFEngine Community {{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}} on two hosts and bootstrap to one of them: ```command -cf-remote --version={{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}} install --edition community --clients 192.168.56.13,192.168.56.14 --bootstrap 192.168.56.13 +cf-remote --version={{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}} install --edition community --clients 192.168.56.13,192.168.56.14 --bootstrap 192.168.56.13 ``` ## 1. Download packages @@ -59,37 +59,37 @@ Choose the right command for your operating system: **Newer 64-bit RPM based distributions: (Redhat/CentOS/SUSE)** ```command -sudo rpm -i cfengine-community-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}.el6.x86_64.rpm +sudo rpm -i cfengine-community-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}.el6.x86_64.rpm ``` **Older 64-bit RPM based distributions: (Redhat/CentOS/SUSE)** (not recommended for policy server) ```command -sudo rpm -i cfengine-community-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}.el4.x86_64.rpm +sudo rpm -i cfengine-community-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}.el4.x86_64.rpm ``` **32-bit RPM based distributions: (Redhat/CentOS/SUSE)** (not recommended for policy server) ```command -sudo rpm -i cfengine-community-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}.el4.i386.rpm +sudo rpm -i cfengine-community-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}.el4.i386.rpm ``` **Newer 64-bit DEB based distributions: (Ubuntu/Debian)** ```command -sudo dpkg -i cfengine-community_{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}_amd64-debian7.deb +sudo dpkg -i cfengine-community_{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}_amd64-debian7.deb ``` **Older 64-bit DEB based distributions: (Ubuntu/Debian)** (not recommended for policy server) ```command -sudo dpkg -i cfengine-community_{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}_amd64-debian4.deb +sudo dpkg -i cfengine-community_{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}_amd64-debian4.deb ``` **32-bit DEB based distributions: (Ubuntu/Debian)** (not recommended for policy server) ```command -sudo dpkg -i cfengine-community_{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}_i386-debian4.deb +sudo dpkg -i cfengine-community_{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}_i386-debian4.deb ``` **Note:** You might get a message like this: "Policy is not found in /var/cfengine/inputs, not starting CFEngine." Do not worry; diff --git a/content/getting-started/installation/general-installation/installation-coreos.markdown b/content/getting-started/installation/general-installation/installation-coreos.markdown index 021a0da02..0602d3fd3 100644 --- a/content/getting-started/installation/general-installation/installation-coreos.markdown +++ b/content/getting-started/installation/general-installation/installation-coreos.markdown @@ -17,13 +17,13 @@ Download the file-system image package for CoreOS from the [Enterprise Downloads 1. On the CoreOS Host, extract the `fs-img-pkg.tar.gz` archive: ```command - tar xvf cfengine-nova-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}.x86_64.fs-img.pkg.tar.gz + tar xvf cfengine-nova-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}.x86_64.fs-img.pkg.tar.gz ``` 2. On the CoreOS Host, run the install script: ```command - sudo ./cfengine-nova-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}.x86_64.fs-img.pkg/install.sh + sudo ./cfengine-nova-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}.x86_64.fs-img.pkg/install.sh ``` Note: Install actions logged to `/var/log/CFEngine-Install.log`. diff --git a/content/getting-started/installation/general-installation/installation-enterprise-generic-tarball.markdown b/content/getting-started/installation/general-installation/installation-enterprise-generic-tarball.markdown index f1c739dbe..e3c45b314 100644 --- a/content/getting-started/installation/general-installation/installation-enterprise-generic-tarball.markdown +++ b/content/getting-started/installation/general-installation/installation-enterprise-generic-tarball.markdown @@ -12,13 +12,13 @@ First download the binary onto the host. Next unpack the archive. For the 64 bit tarball use: ```command -tar --gunzip --extract --directory / --file ./cfengine-nova-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}.x86_64.pkg.tar.gz +tar --gunzip --extract --directory / --file ./cfengine-nova-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}.x86_64.pkg.tar.gz ``` Otherwise, for 32 bit tarball, use: ```command -tar --gunzip --extract --directory / --file ./cfengine-nova-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}.i386.pkg.tar.gz +tar --gunzip --extract --directory / --file ./cfengine-nova-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}.i386.pkg.tar.gz ``` Generate a keypair for the client: diff --git a/content/getting-started/installation/general-installation/installation-enterprise-vagrant.markdown b/content/getting-started/installation/general-installation/installation-enterprise-vagrant.markdown index eee4328f9..45842177d 100644 --- a/content/getting-started/installation/general-installation/installation-enterprise-vagrant.markdown +++ b/content/getting-started/installation/general-installation/installation-enterprise-vagrant.markdown @@ -55,16 +55,16 @@ virtualbox.org. After downloading VirtualBox, install it on your computer. **Note:** To avoid problems, disable other virtualization environments you are running. -## Start the CFEngine Enterprise {{site.CFE_manuals_version}} Vagrant environment +## Start the CFEngine Enterprise {{< params "CFE_manuals_version" >}} Vagrant environment Step 1. Download our ready-made Vagrant project -[tar-file](https://cfengine-package-repos.s3.amazonaws.com/enterprise/Enterprise-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}/misc/CFEngine_Enterprise_vagrant_quickstart-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}.tar.gz). +[tar-file](https://cfengine-package-repos.s3.amazonaws.com/enterprise/Enterprise-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}/misc/CFEngine_Enterprise_vagrant_quickstart-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}.tar.gz). Step 2. Save and unpack the file anywhere on your drive; this creates a Vagrant Project directory. Step 3. Open a terminal and navigate to the Vagrant Project directory (e.g. -`/home/user/CFEngine_Enterprise_vagrant_quickstart-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}`, or `C:\CFEngine_Enterprise_vagrant_quickstart-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}`) and enter the following command: +`/home/user/CFEngine_Enterprise_vagrant_quickstart-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}`, or `C:\CFEngine_Enterprise_vagrant_quickstart-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}`) and enter the following command: ```command vagrant up @@ -124,7 +124,7 @@ Last login: Fri Jun 13 18:58:10 2014 from 10.0.2.2 #### Accessing via GUI If you launch the virtualbox GUI you should find the vagrant vms named -`CFEngine Enterprise {{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}} hub`, and `CFEngine Enterprise {{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}} agent host001`. Additionally, you can uncomment the `v.gui=true` +`CFEngine Enterprise {{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}} hub`, and `CFEngine Enterprise {{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}} agent host001`. Additionally, you can uncomment the `v.gui=true` option in the `Vagrantfile` to have the console gui start with the vms. **Note:** There are two `v.gui` settings to uncomment; one for the hub, and one for the clients. diff --git a/content/getting-started/installation/upgrading.markdown b/content/getting-started/installation/upgrading.markdown index e7533a925..10d3dbf91 100644 --- a/content/getting-started/installation/upgrading.markdown +++ b/content/getting-started/installation/upgrading.markdown @@ -5,7 +5,7 @@ sorting: 30 --- This guide documents our recommendation on how to upgrade an existing -installation of CFEngine Enterprise to {{site.CFE_manuals_version}}. Community users +installation of CFEngine Enterprise to {{< params "CFE_manuals_version" >}}. Community users can use these instructions as a guide skipping the parts that are not relevant. In short, the steps are: @@ -138,14 +138,14 @@ empty before performing an Enterprise Hub binary upgrade. ```console root@hub:~# export BACKUP_DIR="/mnt/plenty-of-free-space" - root@hub:~# rpm -U cfengine-nova-hub-{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}.el6.x86_64.rpm + root@hub:~# rpm -U cfengine-nova-hub-{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}.el6.x86_64.rpm ``` **Debian/Ubuntu:** ```console root@hub:~# export BACKUP_DIR="/mnt/plenty-of-free-space" - root@hub:~# dpkg --install cfengine-nova-hub_{{site.cfengine.branch}}.{{site.cfengine.latest_patch_release}}-{{site.cfengine.latest_package_build}}_amd64-deb7.deb + root@hub:~# dpkg --install cfengine-nova-hub_{{< params "cfengine.branch" >}}.{{< params "cfengine.latest_patch_release" >}}-{{< params "cfengine.latest_package_build" >}}_amd64-deb7.deb ``` _Community does not have a hub specific package._ @@ -209,7 +209,7 @@ empty before performing an Enterprise Hub binary upgrade. "sort":"Host name", "filter":{ "CFEngine version":{ - "not_match":"{{site.cfengine.branch}}.0" + "not_match":"{{< params "cfengine.branch" >}}.0" } }, "select":[ diff --git a/content/reference/functions/_index.markdown b/content/reference/functions/_index.markdown index c2cfd9fdf..a5fcf3c59 100644 --- a/content/reference/functions/_index.markdown +++ b/content/reference/functions/_index.markdown @@ -107,7 +107,7 @@ cf-promises --syntax-description json | jq '.functions | with_entries(select(.va - `hubknowledge()`, and `remotescalar()` for hub queries When enabled -[cached functions](https://docs.cfengine.com/docs/{{site.cfengine.branch}}/search.html?q=The+return+value+is+cached) +[cached functions](https://docs.cfengine.com/docs/{{< params "cfengine.branch" >}}/search.html?q=The+return+value+is+cached) are **not executed on every pass of convergence**. Instead, the function will only be executed once during the [agent evaluation step][Policy evaluation#Agent evaluation step] diff --git a/content/release-notes/_index.markdown b/content/release-notes/_index.markdown index 36f793b69..0d481f317 100644 --- a/content/release-notes/_index.markdown +++ b/content/release-notes/_index.markdown @@ -5,7 +5,7 @@ sorting: 30 --- - [New in CFEngine][New in CFEngine] - Learn about the newest features in CFEngine {{site.CFE_manuals_version}} + Learn about the newest features in CFEngine {{< params "CFE_manuals_version" >}} - [Supported platforms and versions][Supported platforms and versions] These are the supported platforms for the current release. diff --git a/content/release-notes/known-issues.markdown b/content/release-notes/known-issues.markdown index 34b831c74..ef82e27cc 100644 --- a/content/release-notes/known-issues.markdown +++ b/content/release-notes/known-issues.markdown @@ -7,8 +7,8 @@ sorting: 50 CFEngine defects are managed in our [bug tracker][bug tracker]. Please report bugs or unexpected behavior there, following the documented guideline for new bug reports. -- Issues [affecting {{site.CFE_manuals_version}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+affectedVersion+%7E+%22{{site.CFE_manuals_version}}.*%22+AND+status+not+in+%28+%22Rejected%22%29) -- Issues [fixed in {{site.CFE_manuals_version}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+fixVersion+%7E+%22{{site.CFE_manuals_version}}.*%22) +- Issues [affecting {{< params "CFE_manuals_version" >}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+affectedVersion+%7E+%22{{< params "CFE_manuals_version" >}}.%2A%22+AND+status+not+in+%28+%22Rejected%22%29) +- Issues [fixed in {{< params "CFE_manuals_version" >}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+fixVersion+%7E+%22{{< params "CFE_manuals_version" >}}.%2A%22) On this page (below) we will only mention a subset of known issues, which are very severe or noticeable, which we'd like to communicate with users. diff --git a/content/resources/faq/manual-execution.markdown b/content/resources/faq/manual-execution.markdown index d64eea39a..fa06e9273 100644 --- a/content/resources/faq/manual-execution.markdown +++ b/content/resources/faq/manual-execution.markdown @@ -60,7 +60,7 @@ between). Sometimes it's convenient to run `cf-execd` with `--once`. It will execute `exec_command` as defined in `body executor control`. In the [Masterfiles Policy Framework][Masterfiles Policy Framework] this -[defaults](https://github.com/cfengine/masterfiles/blob/{{site.cfengine.branch}}/controls/cf_execd.cf) +[defaults](https://github.com/cfengine/masterfiles/blob/{{< params "cfengine.branch" >}}/controls/cf_execd.cf) to update policy ( `update.cf` ) followed by the default policy ( `promises.cf` ). Output from cf-execd executions is logged to `$(sys.workdir)/outputs`.