This site is built with Jekyll. Documentation content is written in Markdown format located in './docs'
The site is automatically deployed when commits are merged/pushed in master
, hosted at https://codefresh.io/docs/
- Install docker-desktop
- Run
docker compose up
- Open
http://localhost:3131
in your browser, and voila!
To compile scss files into css run the command npm run css
or in the live mode npm run watch-css
.
To compile js files into a bundle run the command npm run js
or in the live mode npm run watch-js
.
Node version 9.11.2
- Install Ruby,
bundler
,jekyll
and other Ruby dependencies withbundle install
. - Run
npm install
to install Node.js dependencies. - Run
npm run css
(or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets. - From the root directory, run
npm run docs-serve-dev
in the command line. - Open
http://localhost:19002
in your browser, and voila.
- In the Enterprise collection, find the document for the ArgoHub collection.
- In the ArgoHub collection, create a folder structure for the required document.
- Create a symbolic link to the document inside the required folder in the ArgoHub collection (refer to the "Create a Symlink" section for details).
- Create a record for the side menu
argohub-nav.yml
that represents the new document.Warning: After adding a new side menu, it is required to delete the
_site
folder to apply the change. - Adjust the document and add conditions for Enterprise and ArgoHub contexts if needed.
- Adjust the the document links (refter to the "Document Links" section).
No actions required - the new content will be automatically reflected in both ArgoHub and Enterprise.
- Repeat step 3.
- Repeat step 6.
- Repeat steps 2 to 6.
- Repeat steps 2 to 6.
- In the IDE's file explorer, copy the relative path of the file you want to share.
- Open the terminal and navigate to the directory where you want to create the symlink.
- Run the following command:
npm run link <relative-path-from-step-1>
Note: In addition to creating a symlink, the command will also add a record in argohub-redirect-mapping.json
to ensure auto-redirection functionality.
- By default, all document content appears the same in both Enterprise and ArgoHub contexts.
- To include content for the ArgoHub collection only:
{% if page.collection == site.gitops_collection %}
- To exclude content from the ArgoHub collection (will appear only in the Enterprise collection):
{% if page.collection != site.gitops_collection %}
We can rely on the automatic redirect from the Enterprise to the ArgoHub Collection (details provided in the section below) to maintain the collection context. For instance, if a link in an ArgoHub Collection document directs to the Enterprise collection, the auto-redirect will return the user to the ArgoHub Collection.
Additionally, we can use the following methods to avoid redirects if needed:
Document links will automatically adjust to the relevant context, eliminating the need for duplication. For example:
({{site.baseurl}}/{{page.collection}}/installation/gitops/shared-configuration/)
Please note that the {{page.collection}}
argument will only work if the folder structure in ArgoHub and Enterprise collections is the same.
If the paths differ, use an if
condition to create two separate links.
Image links do not require duplication or modification – they will work seamlessly in both contexts.
The ArgoHub home page and all pages within the ArgoHub collection are excluded from:
- Commandbar HelpHub Search (managed via Commandbar Content Manager).
- Search engines that support the
noindex
rule, such as Google.
When the GitOps client adds an ArgoHub system type cookie, the Documentation site will detect it and initiate an automatic redirect. If you open any page from the enterprise collection, the site will check for an equivalent document in the ArgoHub collection and redirect you there if one exists.
Redirect links between the Enterprise and ArgoHub collections are stored in the argohub-redirect-mapping.json
file. Running npm run link
automatically updates the file, eliminating the need for manual updates.