Skip to content

ENT-8966: Replaced Jekyll with Hugo documentation builder #3448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
430eb75
Added script to process references in the markdown files
aleksandrychev May 21, 2025
cc18e54
Added pre-processor script to fix issues when Hugo uses CFEngine must…
aleksandrychev May 21, 2025
af899b2
Removed printable processor we do not use
aleksandrychev May 21, 2025
e8f685b
Replaced unsupported published frontmatter with date
aleksandrychev May 22, 2025
2c57044
Adjusted metadata alias to follow directory structure
aleksandrychev May 22, 2025
737c169
Removed category metadata
aleksandrychev May 22, 2025
9e0ba10
Moved section files into directories and renamed to _index.markdown
aleksandrychev May 23, 2025
524588c
Moved documentation conent into conent directory
aleksandrychev May 23, 2025
d3b2a26
Added preprocessor script to fix image paths
aleksandrychev May 26, 2025
c5e48f8
Adjusted comments in content
aleksandrychev May 27, 2025
a0f6b12
Removed unsuported {%raw%}
aleksandrychev May 29, 2025
a9b5e26
removeme: add hugo for tests purposes
aleksandrychev May 29, 2025
47f61b0
adjusted scripts
aleksandrychev May 29, 2025
10403ed
added npm ci to run script
aleksandrychev May 29, 2025
4c38eb2
install hugo
aleksandrychev May 29, 2025
1dcbdc2
adjusted _run.sh: added header_nav_options
aleksandrychev May 29, 2025
545b15b
Switched relative urls on
aleksandrychev May 30, 2025
53594fa
Added relative links
aleksandrychev May 30, 2025
fce0ec6
fixed missing fonts
aleksandrychev May 30, 2025
8ddf0bf
replaced icons wit bi on dropdown
aleksandrychev May 30, 2025
d515947
fixed codeblocks styles
aleksandrychev May 30, 2025
3c7e72c
fixed active menu items highlighting cause by relative paths
aleksandrychev May 30, 2025
523f81c
adjusted title
aleksandrychev Jun 2, 2025
f90da80
Added redirect rules made to handle new documenation structure
aleksandrychev Jun 2, 2025
f2fb919
reveted content path in the menubuilder
aleksandrychev Jun 2, 2025
2e2ffe7
copy content directory to hugo
aleksandrychev Jun 2, 2025
d485d17
copy over search index to the _site/assets
aleksandrychev Jun 2, 2025
5024581
fixed content cp
aleksandrychev Jun 2, 2025
d442f94
updated hugo
aleksandrychev Jun 2, 2025
422a473
Added searchBaseUrl config
aleksandrychev Jun 5, 2025
fbaf8be
updated theme code styles
aleksandrychev Jun 5, 2025
e94f864
Replaced deprecated hugo comments with HTML comments
aleksandrychev Jun 5, 2025
0053f4f
Removed unnecessary files from hugo
aleksandrychev Jun 6, 2025
c0011a2
Removed unnessesary files from generator
aleksandrychev Jun 6, 2025
b7d4f2c
Removed Jekyl dependencies
aleksandrychev Jun 6, 2025
6a89059
Added date to newly added documentation files
aleksandrychev Jun 6, 2025
6b1e0df
reverted _config.yml deletion
aleksandrychev Jun 13, 2025
b94c257
Removed webpack and dependencies
aleksandrychev Jun 13, 2025
5c9e2f2
Added missing icons
aleksandrychev Jun 13, 2025
fc1ce5c
Show versions list on the Versions page
aleksandrychev Jun 13, 2025
e9c04e3
Moved hugo install bits into shared scripts
aleksandrychev Jun 13, 2025
2a9843e
Added bump hugo version action
aleksandrychev Jun 13, 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

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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ core.includes
# Mac Finder

.DS_Store

/hugo/node_modules
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Leave this as `default`.
The title of the page. Quoting is only necessary if the title contains YAML
keywords (like "on").

published: true|false
date: 2025-05-22T00:00:00+00:00|false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, date is the date timestamp after which a build would publish the page. Is that date used by anything else?


Pages that set this tag to `false` will not be part of the navigation structure.
The HTML content will however be generated.
Expand Down
2 changes: 1 addition & 1 deletion cheatsheet.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: printable
title: Markdown cheatsheet
published: true
date: 2025-05-22T00:00:00+00:00
sorting: 1
alias: markdown-cheatsheet.html
---
Expand Down
26 changes: 13 additions & 13 deletions index.markdown → content/_index.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: index
title: Home
published: true
date: 2025-05-22T00:00:00+00:00
sorting: 1
categories: ["index"]
alias: index.html
Expand All @@ -14,53 +14,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>
<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 +69,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
2 changes: 1 addition & 1 deletion api.markdown → content/api/_index.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: API
published: true
date: 2025-05-22T00:00:00+00:00
sorting: 50
---

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Browsing host information
published: true
date: 2025-05-22T00:00:00+00:00
sorting: 50
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Tracking changes
published: true
date: 2025-05-22T00:00:00+00:00
sorting: 50
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Checking status
published: true
date: 2025-05-22T00:00:00+00:00
sorting: 20
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Managing settings
published: true
date: 2025-05-22T00:00:00+00:00
sorting: 30
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Managing users and roles
published: true
date: 2025-05-22T00:00:00+00:00
sorting: 40
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: SQL query examples
published: true
date: 2025-05-22T00:00:00+00:00
---

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Actions API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: Audit log API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: Build API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: Changes REST API
published: true
date: 2025-05-22T00:00:00+00:00
---

**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,7 @@
---
layout: default
title: CMDB API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: Import & export API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: Import & export compliance report API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: Federated reporting configuration API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: File changes API
published: true
date: 2025-05-22T00:00:00+00:00
---


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Fist time setup API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: Health diagnostic API
published: true
date: 2025-05-22T00:00:00+00:00
---

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

Host API allows to access host specific information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Inventory API
published: true
date: 2025-05-22T00:00:00+00:00
---
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,7 @@
---
layout: default
title: LDAP authentication API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: Personal groups API
published: true
date: 2025-05-22T00:00:00+00:00
---
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,7 @@
---
layout: default
title: Query REST API
published: true
date: 2025-05-22T00:00:00+00:00
---

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,7 @@
---
layout: default
title: Reset password API
published: true
date: 2025-05-22T00:00:00+00:00
---

## Request reset password link and token
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Shared groups API
published: true
date: 2025-05-22T00:00:00+00:00
---
The shared groups API enables creating host groups based on host filters (the same ones used in inventory) and assigning CMDB data to them.

Expand Down
Loading