- Notifications
You must be signed in to change notification settings - Fork165
Source for Codefresh documentation
License
codefresh-io/docs.codefresh.io
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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 inmaster, hosted athttps://codefresh.io/docs/
- Installdocker-desktop
- Run
docker compose up - Open
http://localhost:3131in your browser, and voila!
To compile scss files into css run the commandnpm run css or in the live modenpm run watch-css.To compile js files into a bundle run the commandnpm run js or in the live modenpm run watch-js.Node version9.11.2
- Install Ruby,
bundler,jekylland other Ruby dependencies withbundle install. - Run
npm installto 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-devin the command line. - Open
http://localhost:19002in 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.ymlthat represents the new document.Warning: After adding a new side menu, it is required to delete the
_sitefolder 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).
- After syncing the documentation content in the CommandBar's Enterprise account, please unpublish the new GitOps Cloud document from the Enterprise content table.
Recommendation: To exclude all GitOps Cloud pages from the Enterprise segment, search for the keyword
/docs/gitops/, select all entries, and unpublish them.
No actions required - the new content will be automatically reflected in both ArgoHub and Enterprise.
- Repeat step 3.
- Repeat step 6.
- Repeat step 7.
- Repeat steps 2 to 7.
- Repeat steps 2 to 7.
By default, users are redirected from the Enterprise segment to the GitOps (ArgoHub) segment.
- Accessinghttps://codefresh.io/docs/ will redirect tohttps://codefresh.io/docs/gitops/
For more details, refer to the "Auto Redirect from Enterprise to ArgoHub Collection" section below.
- To switch to the GitOps segment, log in to Codefresh and switch to an account with the GitOps type. This will clear the Enterprise cookie.
- To switch to the Enterprise segment, log in to Codefresh and switch to an account with any other type. This will set the Enterprise cookie.
To prevent automatic redirection to the ArgoHub collection and remain in the Enterprise segment, add the?ent query parameter to the URL. When this parameter is present, the redirect logic is bypassed.
You can also link to mid-topic titles using `?ent. Add the linkafter the query parameter as in Example 2 below.
Example:
URL to topic title:
https://[placeholder-domain]/docs/docs/promotions/promotion-flow/?entURL for mid-topic links:
https://[placeholder-domain]/docs/docs/promotions/product-promotion-props/?ent#product-properties-for-promotion
Adding theent parameter ensures users remain in the Enterprise segment without being redirected to the ArgoHub collection.
When a page is accessed with the
?entparameter, it will remain locked in the Enterprise segment for the duration of the browser session. Closing the specific window or tab will release this lock.The lock isnot inherited when opening a new tab or window with the same link. It will function as per the default behavior without the override.
In the local documentation site (http://localhost:3131/), open the console in developer tools and inject the appropriate cookie:
Switch to Enterprise Segment:
document.cookie='cfdoctype=enterprise; SameSite=Strict; Domain=localhost; Max-age=2592000; Path=/';
Switch to GitOps Segment:
document.cookie='cfdoctype=enterprise; SameSite=Strict; Domain=localhost; Max-age=0; Path=/';
- 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 inargohub-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 anif 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
noindexrule, such as Google.
Commandbar synchronizes the documentation site content using a crawler. However, the Auto Redirect mechanism prevents the crawler from accessing all Enterprise pages (see the "Auto Redirect from Enterprise to ArgoHub Collection" section for details). To address this issue, the Commandbar team configured the crawler to include thecfdoctype cookie, enabling it to access all documentation pages and bypass the redirect.
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 theargohub-redirect-mapping.json file. Runningnpm run link automatically updates the file, eliminating the need for manual updates.
About
Source for Codefresh documentation
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.