Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
bb49d7c
Added script to process references in the markdown files
aleksandrychev May 21, 2025
25842d9
Added pre-processor script to fix issues when Hugo uses CFEngine must…
aleksandrychev May 21, 2025
dacf49a
Removed printable processor we do not use
aleksandrychev May 21, 2025
74aef1f
Adjusted metadata alias to follow directory structure
aleksandrychev May 22, 2025
01cccee
Removed category metadata
aleksandrychev May 22, 2025
b4fb72e
Moved section files into directories and renamed to _index.markdown
aleksandrychev May 23, 2025
6b4ba4f
Moved documentation conent into conent directory
aleksandrychev May 23, 2025
a4406ee
Added preprocessor script to fix image paths
aleksandrychev May 26, 2025
bf806e6
Adjusted the links from html to path-based on the Home page
aleksandrychev Jun 18, 2025
bbacb01
Replaced Jekyll comments with HTML comments supported by Hugo
aleksandrychev Jun 18, 2025
56c6833
Added search and versions pages
aleksandrychev Jun 18, 2025
ab9ef4e
Removed unsuported {%raw%}
aleksandrychev Jun 18, 2025
5e9ad3a
Adjusted pre-process and run scirpts
aleksandrychev Jun 18, 2025
1bc505c
Added redirect rules made to handle new documenation structure
aleksandrychev Jun 2, 2025
3f7907b
Removed unnessesary files from generator
aleksandrychev Jun 6, 2025
559f947
Removed Jekyl dependencies
aleksandrychev Jun 18, 2025
00ae217
Removed webpack and dependencies
aleksandrychev Jun 13, 2025
6900a47
Show versions list on the Versions page
aleksandrychev Jun 13, 2025
24b4403
Moved hugo install bits into shared scripts
aleksandrychev Jun 13, 2025
4dae4d3
Added bump hugo version action
aleksandrychev Jun 13, 2025
9eca443
Added hugo config, layouts and static files
aleksandrychev May 29, 2025
3ee7e93
Added branch placeholder to the Hugo config and script that replaces it
aleksandrychev Jun 17, 2025
b88632e
Removed unsupported published frontmatter
aleksandrychev May 22, 2025
acff1b2
Get rid of try/except blocks from cfdoc preprocess
aleksandrychev Jun 18, 2025
a9dbccb
Get rid of generator/pages directory as we use hugo/content
aleksandrychev Jun 18, 2025
2086230
Updated README.md
aleksandrychev Jun 18, 2025
8fafe9e
Removed codeblock resolver pre-process script
aleksandrychev Jun 18, 2025
f6cebd5
Removed included markdowns to prevent them from being rendered
aleksandrychev Jun 20, 2025
e6c2117
Fixed whitespaces
aleksandrychev Jun 23, 2025
6228897
Removed versions and search old markdowns
aleksandrychev Jun 24, 2025
b79a907
Copy redirects.conf to _site
aleksandrychev Jun 24, 2025
2560074
Copied search index into proper location
aleksandrychev Jun 25, 2025
9fe5cf5
Added searchUrlPrefix config
aleksandrychev Jun 25, 2025
9bfac3c
Fixed versions links
aleksandrychev Jun 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 42 additions & 0 deletions .github/workflows/bump-hugo-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Hugo version update
Comment thread
aleksandrychev marked this conversation as resolved.

on:
schedule:
- cron: "0 0 * * 0" #perform every sunday's night
workflow_dispatch:

jobs:
update_hugo_version:
if: github.repository_owner == 'cfengine' || github.repository_owner == 'mendersoftware' || github.repository_owner == 'NorthernTechHQ'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Fetch latest Hugo release info
id: fetch_hugo_version
run: |
release_info=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest)
version=$(echo "$release_info" | jq -r '.tag_name' | sed 's/v//')
# download checksums and find checksum of hugo_${version}_Linux-64bit.tar.gz
checksum=$( curl -sSL https://github.com/gohugoio/hugo/releases/download/v${version}/hugo_${version}_checksums.txt | grep hugo_${version}_Linux-64bit.tar.gz | grep -oE "[a-z0-9]{64}")
echo "version=$version" >> $GITHUB_OUTPUT
echo "checksum=$checksum" >> $GITHUB_OUTPUT

- name: Update install_hugo.sh
run: |
sed -i "s|https://github.com/gohugoio/hugo/releases/download/v.*_Linux-64bit.tar.gz|https://github.com/gohugoio/hugo/releases/download/v${{ steps.fetch_hugo_version.outputs.version }}/hugo_${{ steps.fetch_hugo_version.outputs.version }}_Linux-64bit.tar.gz|" generator/build/install_hugo.sh
sed -i "s/.*sha256sum.*/RUN echo \"${{ steps.fetch_hugo_version.outputs.checksum }} hugo.tar.gz\" | sha256sum -c/" generator/build/install_hugo.sh
- name: Create Pull Request
uses: cfengine/create-pull-request@v7
with:
commit-message: Upgraded Hugo version to ${{ steps.fetch_hugo_version.outputs.version }}
title: Upgraded Hugo version to ${{ steps.fetch_hugo_version.outputs.version }}
body: |
This PR updates the version of Hugo used in the generator/build/install_hugo.sh to ${{ steps.fetch_hugo_version.outputs.version }}.
reviewers: |
aleksandrychev

branch: hugo-version-update-${{ steps.fetch_hugo_version.outputs.version }}
sign-commits: true
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,18 +223,14 @@ Note: Do not use markdown files prefixed with `.`. They are not picked up by the

Additional META tags you should set are:

layout: default

Leave this as `default`.

title: "The Title"

The title of the page. Quoting is only necessary if the title contains YAML
keywords (like "on").

published: true|false
hidden: true

Pages that set this tag to `false` will not be part of the navigation structure.
Pages that set this tag to `true` will not be part of the navigation structure.
The HTML content will however be generated.

tags: [list, of, tags with space, all lowercase]
Expand Down Expand Up @@ -326,7 +322,7 @@ With single backticks, this would link to the documentation of the `meta` attrib
### Custom macros

The documentation generator will pre-process the markdown content
before passing it to Jekyll for the rendering. The pre-processor
before passing it to Hugo for the rendering. The pre-processor
understands and replaces the macros. Macros all have the form

`[%CFEngine_MACRO(parameters)%]`
Expand Down Expand Up @@ -518,11 +514,11 @@ links.

- follow the [Policy style guide](guide/writing-and-serving-policy/policy-style.markdown)
in examples and code snippets
- use the appropriate lexer for syntax highlighting via Pygments
- use the appropriate lexer for syntax highlighting via Chroma

Most important are the `cf3` lexer, as well as `bash`, `console`,
`diff`, `shell-session` and `sql`. But Jekyll supports
[many more lexers](https://pygments.org/docs/lexers/)
`diff`, `shell-session` and `sql`. But Hugo supports
[many more lexers](https://gohugo.io/content-management/syntax-highlighting/#languages)

- avoid custom color schemes and hand-coded HTML
- document the example after the example code
Expand Down Expand Up @@ -668,9 +664,9 @@ Special variables are documented within the page of their context.

## Publishing

Jekyll is used to generate the HTML pages. The toolchain is available at
Hugo is used to generate the HTML pages. The toolchain is available at
https://github.com/cfengine/documentation/tree/master/generator. After you compile pages,
Jekyll will place all files into the \_site folder, without subdirectories.
Hugo will place all files into the \_site folder.

Commits in this repository trigger the documentation generator to run, which
then updates the contents of https://docs.cfengine.com/docs/
Expand Down
1 change: 0 additions & 1 deletion cheatsheet.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: printable
title: Markdown cheatsheet
published: true
sorting: 1
alias: markdown-cheatsheet.html
---
Expand Down
25 changes: 12 additions & 13 deletions index.markdown → content/_index.markdown
Comment thread
aleksandrychev marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: index
title: Home
published: true
sorting: 1
categories: ["index"]
alias: index.html
Expand All @@ -14,53 +13,53 @@ alias: index.html
It includes the reference for the following versions of CFEngine:
</div>
<ul class="home-top_versions">
{% include lts_versions_list.html %}
{{< includehtml file="static/lts_versions_list.html" >}}
</ul>
</div>
<div class="home-links">
<ul>
<li>Getting started</li>
<li>
<a href="getting-started-installation.html">Installation</a>
<a href="/getting-started/installation">Installation</a>
Comment thread
aleksandrychev marked this conversation as resolved.
<div>Download and install CFEngine for the first time.</div>
</li>
<li>
<a href="getting-started-modules-from-cfengine-build.html">Modules</a>
<a href="/getting-started/modules-from-cfengine-build">Modules</a>
<div>Use modules to easily add reports or get things done without writing any code.</div>
</li>
<li>
<a href="getting-started-reporting-and-web-ui.html">Reporting and web UI</a>
<a href="/getting-started/reporting-and-web-ui">Reporting and web UI</a>
<div>Know more about your infrastructure and hosts, their data, compliance and make changes from within the Web UI.</div>
</li>
<li>
<a href="getting-started-writing-policy.html">Writing policy</a>
<a href="/getting-started/writing-policy">Writing policy</a>
<div>Write and deploy your first policy files to make changes to systems.</div>
</li>
<li>
<a href="getting-started-developing-modules.html">Developing modules</a>
<a href="/getting-started/developing-modules">Developing modules</a>
<div>Turn your policy, reports, or python code into CFEngine Build modules for others to use.</div>
</li>
<li>
<a href="examples-tutorials-writing-and-serving-policy.html">Tutorial series on policy language</a>
<a href="/examples/tutorials/writing-and-serving-policy">Tutorial series on policy language</a>
<div>In-depth tutorials on how to work with CFEngine policy.</div>
</li>
</ul>
<ul>
<li>Popular</li>
<li>
<a href="reference-promise-types.html">Promise types</a>
<a href="/reference/promise-types">Promise types</a>
<div>Learn about processes, packages, users, files, storage, services, etc.</div>
</li>
<li>
<a href="api-enterprise-api-ref.html">API reference</a>
<a href="/api/enterprise-api-ref">API reference</a>
<div>The API is a conventional REST API which supports HTTP GET, PUT, POST, and DELETE operations.</div>
</li>
<li>
<a href="reference-language-concepts.html">Language concepts</a>
<a href="/reference/language-concepts">Language concepts</a>
<div>Learn about bundles, bodies, promises, variables, classes and decisions.</div>
</li>
<li>
<a href="examples-tutorials-manage-packages.html">Package management</a>
<a href="/examples/tutorials/manage-packages">Package management</a>
<div>Learn how to install, manage, and remove packages using CFEngine.</div>
</li>
<li class="cfe-build">
Expand All @@ -69,7 +68,7 @@ alias: index.html
CFEngine Build is a catalog of policy and modules created by CFEngine, our partners and community which
helps you simplify the automation process.
</div>
<a target="_blank" class="btn btn-transparent" href="https://build.cfengine.com">Go to the page <img src="./media/images/arrow-right.svg" /></a>
<a target="_blank" class="btn btn-transparent" href="https://build.cfengine.com">Go to the page <img src="/arrow-right.svg" /></a>
</li>
</ul>
</div>
Expand Down
1 change: 0 additions & 1 deletion api.markdown → content/api/_index.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: API
published: true
sorting: 50
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Enterprise API examples
published: true
sorting: 6
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Browsing host information
published: true
sorting: 50
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Tracking changes
published: true
sorting: 50
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Checking status
published: true
sorting: 20
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Managing settings
published: true
sorting: 30
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Managing users and roles
published: true
sorting: 40
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: SQL query examples
published: true
---

### Synchronous Example: Listing hostname and IP for Ubuntu hosts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Enterprise API reference
published: true
sorting: 70
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Actions API
published: true
---

Actions API enables you to perform specific actions such a requesting report collection.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Audit log API
published: true
---

Audit log API provides access to system audit logs that track user actions across the platform made to critical parts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Build API
published: true
---

The Build API enables you to easily manage policy projects and their respective CFEngine Build modules.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Changes REST API
published: true
---

**Changes API** allows to track changes performed by CFEngine agent in the infrastructure.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: CMDB API
published: true
---

The configuration management database (CMDB) API enables you to manage classes and variables for specific hosts.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Import & export API
published: true
---

Import & export API provides users the ability to transfer Mission Portal data between hubs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Import & export compliance report API
published: true
---

This provides users the ability to transfer compliance reports between hubs or create reports from a JSON definition file.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Federated reporting configuration API
published: true
---

This API is used for configuring hubs so that a single hub can be used to report on any host connected to participating feeder hubs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: File changes API
published: true
---


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Fist time setup API
published: true
---

The First time setup API enables creation of the initial administrator user.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Health diagnostic API
published: true
---

This API provides access to health diagnostic information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Host REST API
published: true
---

Host API allows to access host specific information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Inventory API
published: true
---
Inventory API allows to access inventory reports and attributes dictionary.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: LDAP authentication API
published: true
---

LDAP authentication API allows to check ldap user credentials and change LDAP settings.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Personal groups API
published: true
---
The personal groups API enables creating host groups based on host filters (the same ones used in inventory reports).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Query REST API
published: true
---

In case of a need for full flexibility, Query API allow users to execute SQL queries on CFEngine Database.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
title: Reset password API
published: true
---

## Request reset password link and token
Expand Down
Loading