Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9567142

Browse files
feat: Add ArgoHub documentation and navigation structure (POC) (#1134)
* feat: Add ArgoHub documentation and navigation structure (POC)* Temporarily set isRedirectRequired to true for testing purposes* Update ArgoHub section to clarify context-specific information* Update redirect logic for ArgoHub documentation path* fix* Enhance ArgoHub documentation with new structure and navigation updates* Update navigation links* lint* Add new sidebar layout for ArgoHub documentation* Implement automatic redirects from Enterprise to ArgoHub collection and update documentation* Update redirect mapping* Add symlink creation script and update README with symlink instructions* Update README to clarify document link adjustments
1 parentba1ba8b commit9567142

File tree

15 files changed

+545
-7
lines changed

15 files changed

+545
-7
lines changed

‎README.md‎

Lines changed: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#docs.codefresh.io
2-
[![Codefresh build status](https://g.codefresh.io/api/badges/pipeline/codefresh-inc/codefresh-io%2Fdocs.codefresh.io%2Flive-docs?branch=master&key=eyJhbGciOiJIUzI1NiJ9.NTY3MmQ4ZGViNjcyNGI2ZTM1OWFkZjYy.AN2wExsAsq7FseTbVxxWls8muNx_bBUnQWQVS8IgDTI&type=cf-1)](https://g.codefresh.io/pipelines/live-docs/builds?repoOwner=codefresh-io&repoName=docs.codefresh.io&serviceName=codefresh-io%2Fdocs.codefresh.io&filter=trigger:build~Build;branch:master;pipeline:5a941be91a89c60001c3fad4~live-docs)
2+
3+
[![Codefresh build status](https://g.codefresh.io/api/badges/pipeline/codefresh-inc/codefresh-io%2Fdocs.codefresh.io%2Flive-docs?branch=master&key=eyJhbGciOiJIUzI1NiJ9.NTY3MmQ4ZGViNjcyNGI2ZTM1OWFkZjYy.AN2wExsAsq7FseTbVxxWls8muNx_bBUnQWQVS8IgDTI&type=cf-1)](https://g.codefresh.io/pipelines/live-docs/builds?repoOwner=codefresh-io&repoName=docs.codefresh.io&serviceName=codefresh-io%2Fdocs.codefresh.io&filter=trigger:build~Build;branch:master;pipeline:5a941be91a89c60001c3fad4~live-docs)
34

45
This site is built with Jekyll. Documentation content is written in Markdown format located in './docs'
56

67
##Deploying
8+
79
The site is automatically deployed when commits are merged/pushed in`master`, hosted athttps://codefresh.io/docs/
810

911
###Preview documentation locally with Docker (Recommended)
1012

11-
1. Install[docker-compose](https://docs.docker.com/compose/)
12-
2. Run`docker-compose up`
13+
1. Install[docker-desktop](https://www.docker.com/products/docker-desktop/)
14+
2. Run`dockercompose up`
1315
3. Open`http://localhost:3131` in your browser, and voila!
1416

1517
To compile scss files into css run the command`npm run css` or in the live mode`npm run watch-css`.
@@ -24,4 +26,73 @@ Node version `9.11.2`
2426
4. From the root directory, run`npm run docs-serve-dev` in the command line.
2527
5. Open`http://localhost:19002` in your browser, and voila.
2628

29+
##Adding document to ArgoHub collection
30+
31+
1. In the Enterprise collection, find the document for the ArgoHub collection.
32+
2. In the ArgoHub collection, create a folder structure for the required document.
33+
3. Create a symbolic link to the document inside the required folder in the ArgoHub collection (refer to the "Create a Symlink" section for details).
34+
4. Create a record for the side menu`argohub-nav.yml` that represents the new document.
35+
5. Adjust the document and add conditions for Enterprise and ArgoHub contexts if needed.
36+
6. Adjust the the document links (refter to the "Document Links" section)
37+
7. In the`argohub-redirect-mapping.js`, add a redirect link between the Enterprise and ArgoHub collections.
38+
39+
##Document Changes
40+
41+
###Content Changes
42+
43+
No actions required - the new content will be automatically reflected in both ArgoHub and Enterprise.
44+
45+
###Path Changes
46+
47+
####If no changes to the ArgoHub structure are required
48+
49+
- Repeat step 3.
50+
- Repeat step 6.
51+
- Repeat step 7.
52+
53+
####If changes to the ArgoHub structure are required
54+
55+
- Repeat steps 2 to 7.
56+
57+
###Splitting a Document into Multiple Documents
58+
59+
- Repeat steps 2 to 7.
60+
61+
##ArgoHub Collection Notes
62+
63+
###Reusing Existing Documents
64+
65+
####Create a Symlink between Enterprise and ArgoHub Collections
66+
67+
1. In the IDE's file explorer, copy the relative path of the file you want to share.
68+
2. Open the terminal and navigate to the directory where you want to create the symlink.
69+
3. Run the following command:`npm run link <relative-path-from-step-1>`
70+
71+
####Conditions to Render Text for Specific Contexts
72+
73+
- By default, all document content appears the same in both Enterprise and ArgoHub contexts.
74+
- To include content for the ArgoHub collection only:`{% if page.layout == "argohub" %}`
75+
- To exclude content from the ArgoHub collection (will appear only in the Enterprise collection):`{% if page.layout != "argohub" %}`
76+
77+
####Document Links
78+
79+
Document links will automatically adjust to the relevant context, eliminating the need for duplication. For example:
80+
`({{site.baseurl}}/{{page.collection}}/installation/gitops/shared-configuration/)`
81+
82+
Please note that the`{{page.collection}}` argument will only work if the folder structure in ArgoHub and Enterprise collections is the same.
83+
If the paths differ, use an`if` condition to create two separate links.
84+
85+
####Document Images
86+
87+
Image links do not require duplication or modification – they will work seamlessly in both contexts.
88+
89+
###Search Engines and Internal Search
90+
91+
The ArgoHub home page and all pages within the ArgoHub collection are excluded from:
92+
93+
- Commandbar HelpHub Search (managed via Commandbar Content Manager).
94+
- Search engines that support the`noindex` rule, such as Google.
95+
96+
###Auto Redirect from Enterprise to ArgoHub Collection
2797

98+
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.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../_docs/installation/gitops/shared-configuration.md
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../_docs/getting-started/intro-to-codefresh.md

‎_config.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ collections:
8484
docs:
8585
output:true
8686
permalink:/:collection/:path/
87+
argohub:
88+
output:true
89+
permalink:/:collection/:path/
8790

8891
# Defaults
8992
defaults:
@@ -109,6 +112,14 @@ defaults:
109112
layout:docs
110113
toc:true
111114
wide:true
115+
# _argohub
116+
-scope:
117+
path:"_argohub"
118+
type:argohub
119+
values:
120+
layout:argohub
121+
toc:true
122+
wide:true
112123

113124
# #RSS Feed Location
114125
feed:

‎_data/argohub-nav.yml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-title:ArgoHub Introduction
2+
url:"/introduction"
3+
pages:
4+
-title:What is Codefresh?
5+
url:"/intro-to-codefresh"
6+
7+
-title:Installation
8+
url:"/installation"
9+
pages:
10+
-title:GitOps Runtimes
11+
url:"/gitops"
12+
sub-pages:
13+
-title:Shared Configuration Repository
14+
url:"/shared-configuration"

‎_includes/argohub-docs-navbar.html‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<headerclass="bd-navbar py-2 py-md-0">
2+
<div
3+
class="container-fluid navbar navbar-dark navbar-expand flex-column flex-md-row py-0"
4+
>
5+
<a
6+
class="navbar-brand mx-0 mx-md-2 d-flex align-items-center"
7+
href="{{ site.baseurl }}/argohub"
8+
onclick="ga('send', 'event', 'Navbar', 'Docs links', 'Home');"
9+
aria-label="Codefresh"
10+
>
11+
<div>
12+
{%- include icons/codefresh-logo.svg width="160" height="auto"
13+
class="align-middle" -%}
14+
</div>
15+
</a>
16+
17+
<divclass="navbar-nav-scroll order-1 order-md-1 mx-md-auto">
18+
<ulclass="navbar-nav flex-row mx-md-auto">
19+
<liclass="nav-item">
20+
<a
21+
class="nav-link"
22+
href="{{ site.baseurl }}/docs/example-catalog/ci-examples/"
23+
onclick="ga('send', 'event', 'Navbar', 'Docs links', 'Open Examples');"
24+
>Examples</a
25+
>
26+
</li>
27+
<liclass="nav-item">
28+
<a
29+
class="nav-link"
30+
href="{{ site.baseurl }}/docs/whats-new/changelog/"
31+
onclick="ga('send', 'event', 'Navbar', 'Docs links', 'Open Changelog');"
32+
>What's New</a
33+
>
34+
</li>
35+
</ul>
36+
</div>
37+
38+
<button
39+
onclick="window.CommandBar.openHelpHub(); setTimeout(() => {
40+
document.querySelector('input[data-testid=helphub-input]').focus()
41+
}, 100)"
42+
class="helpbub-toggler helpbub-toggler--small order-2 order-md-2"
43+
aria-label="Search Codefresh Documentation"
44+
type="button"
45+
>
46+
<divclass="d-flex align-items-center">
47+
<imgsrc="{{site.baseurl}}/images/icons/search.png"/>
48+
<spanclass="ml-2">Search</span>
49+
</div>
50+
<spanclass="helpbub-toggler--hotkey">Ctrl / &#8984; + K</span>
51+
</button>
52+
</div>
53+
</header>
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
<navclass="collapse bd-links"id="bd-docs-nav">
2+
{%-assigncurrent_page_url=site.baseurl |append:page.url -%}
3+
4+
<ulid="bd-docs-nav-list"class="list-unstyled">
5+
{%-fornavIteminsite.data.argohub-nav -%}
6+
7+
{%ifnavItem.url %}
8+
{%-assigngroup_slug=navItem.url |slugify -%}
9+
{%else %}
10+
{%-assigngroup_slug=navItem.title |slugify -%}
11+
{%endif %}
12+
13+
{%-assignlink=navItem.pages |first -%}
14+
15+
{%iflink.url %}
16+
{%-assignlink_slug=link.url |slugify -%}
17+
{%else %}
18+
{%-assignlink_slug=link.title |slugify -%}
19+
{%endif %}
20+
21+
{%assigngroup_url=site.baseurl |append:'/argohub/' |append:group_slug |append:'/' %}
22+
23+
{%-assignactive=nil -%}
24+
25+
{%-ifcurrent_page_urlcontainsgroup_url -%}
26+
{%-assignactive='active' -%}
27+
{%-endif -%}
28+
29+
<liclass="bd-toc-item bd-nav-links-item {%unlessactive==nil %} {{active }}{%endunless %}{%unlessnavItem.pages.size!= 0%} has-children {%endunless %}">
30+
<!-- first lvl - group-->
31+
<aclass="h6 bd-nav-links-item-group bd-toc-link font-weight-bold"
32+
data-size="{{navItem.pages.size }}"
33+
data-href="{{group_url }}{%iflink_slug %}{{link_slug }}/{%endif %}">
34+
{{navItem.title }}
35+
</a>
36+
37+
<!-- 2nd lvl menu - doc-->
38+
<ulclass="nav bd-sidenav">
39+
{%-fordocinnavItem.pages -%}
40+
41+
{%ifdoc.urlcontains'/argohub/'%}
42+
{%assigndoc_disabled=true %}
43+
{%else %}
44+
{%assigndoc_disabled=false %}
45+
{%endif %}
46+
47+
{%ifdoc.url %}
48+
{%-assigndoc_slug=doc.url |slugify -%}
49+
{%else %}
50+
{%-assigndoc_slug=doc.title |slugify -%}
51+
{%endif %}
52+
53+
{%assigndoc_url=group_url |append:doc_slug |append:'/' %}
54+
55+
{%-assignactive=nil -%}
56+
57+
{%-ifcurrent_page_urlcontainsdoc_url -%}
58+
{%-assignactive='bd-sidenav-active active' -%}
59+
{%-endif -%}
60+
61+
<!-- 2nd lvl menu item - doc-->
62+
<liclass="{%unlessactive==nil %} {{active }} {%endunless %} {%ifdoc.sub-pages.size> 0%} has-children {%endif %} {%ifdoc_disabled==true %}disabled{%endif %}">
63+
<ahref="{{doc_url }}"
64+
data-size="{{doc.sub-pages.size }}"
65+
data-doc-slug="{{doc_slug }}"
66+
{%ifdoc_disabled==true %}class="disabled"{%endif %}
67+
>
68+
{{doc.title }}
69+
</a>
70+
71+
{%unlessdoc.sub-pages==nil %}
72+
<!-- 3rd lvl menu - sub_doc-->
73+
<ulclass="nav bd-sidenav">
74+
{%-forsub_docindoc.sub-pages -%}
75+
76+
{%ifsub_doc.urlcontains'/argohub/'%}
77+
{%assignsubdoc_disabled=true %}
78+
{%else %}
79+
{%assignsubdoc_disabled=false %}
80+
{%endif %}
81+
82+
{%ifsub_doc.url %}
83+
{%-assignsub_doc_slug=sub_doc.url |slugify -%}
84+
{%else %}
85+
{%-assignsub_doc_slug=sub_doc.title |slugify -%}
86+
{%endif %}
87+
88+
{%-assignsub_doc_url=doc_url |append:sub_doc_slug |append:'/' -%}
89+
90+
{%-assignsub_active=nil -%}
91+
92+
{%-ifcurrent_page_urlcontainssub_doc_url -%}
93+
{%-assignsub_active='active bd-sidenav-active' -%}
94+
{%-endif -%}
95+
96+
<!-- 3rd lvl menu item - sub_doc-->
97+
<liclass="bd-sidenav-item {%unlesssub_active==nil %}{{sub_active }}{%endunless %} {%ifsubdoc_disabled==true %}disabled{%endif %} {%ifsub_doc.sub-pages.size> 0%}has-children{%endif %}">
98+
<ahref="{{sub_doc_url }}"
99+
{%ifsubdoc_disabled==true %}class="disabled"{%endif %}
100+
>
101+
{{sub_doc.title }}
102+
</a>
103+
104+
<!-- 4rd lvl menu - sub_doc_lvl2-->
105+
{%unlesssub_doc.sub-pages==nil %}
106+
<ulclass="nav bd-sidenav">
107+
{%-forsub_doc_lvl2insub_doc.sub-pages -%}
108+
109+
{%ifsub_doc_lvl2.url %}
110+
{%-assignsub_doc_lvl2_slug=sub_doc_lvl2.url |slugify -%}
111+
{%else %}
112+
{%-assignsub_doc_lvl2_slug=sub_doc_lvl2.title |slugify -%}
113+
{%endif %}
114+
115+
{%-assignsub_doc_lvl2_active=nil -%}
116+
117+
{%-assignsub_doc_lvl2_url=sub_doc_url |append:sub_doc_lvl2_slug |append:'/' -%}
118+
119+
{%-ifcurrent_page_urlcontainssub_doc_lvl2_url -%}
120+
{%-assignsub_doc_lvl2_active='active bd-sidenav-active' -%}
121+
{%-endif -%}
122+
123+
<!-- 4rd lvl menu item - sub_doc_lvl2-->
124+
<liclass="bd-sidenav-item {%unlesssub_doc_lvl2_active==nil %}{{sub_doc_lvl2_active }}{%endunless %} {%ifsub_doc_lvl2.sub-pages.size> 0%}has-children{%endif %}">
125+
<ahref="{{sub_doc_lvl2_url }}">
126+
{{sub_doc_lvl2.title }}
127+
</a>
128+
129+
<!-- 5rd lvl menu - subdoc_lvl3-->
130+
{%unlesssub_doc_lvl2.sub-pages==nil %}
131+
<ulclass="nav bd-sidenav">
132+
{%-forsub_doc_lvl3insub_doc_lvl2.sub-pages -%}
133+
134+
{%ifsub_doc_lvl3.url %}
135+
{%-assignsub_doc_lvl3_slug=sub_doc_lvl3.url |slugify -%}
136+
{%else %}
137+
{%-assignsub_doc_lvl3_slug=sub_doc_lvl3.title |slugify -%}
138+
{%endif %}
139+
140+
{%-assignsub_doc_lvl3_active=nil -%}
141+
142+
{%-assignsub_doc_lvl3_url=sub_doc_lvl2_url |append:sub_doc_lvl3_slug |append:'/' -%}
143+
144+
{%-ifcurrent_page_urlcontainssub_doc_lvl3_url -%}
145+
{%-assignsub_doc_lvl3_active='active bd-sidenav-active' -%}
146+
{%-endif -%}
147+
148+
<!-- 5rd lvl menu item - subdoc_lvl3-->
149+
<liclass="bd-sidenav-item {%unlesssub_doc_lvl3_active==nil %}{{sub_doc_lvl3_active }}{%endunless %}">
150+
<ahref="{{sub_doc_lvl3_url }}">
151+
{{sub_doc_lvl3.title }}
152+
</a>
153+
</li>
154+
{%-endfor -%}
155+
</ul>
156+
{%endunless %}
157+
</li>
158+
{%-endfor -%}
159+
</ul>
160+
{%endunless %}
161+
</li>
162+
163+
{%-endfor -%}
164+
</ul>
165+
{%endunless %}
166+
167+
{%-comment -%}
168+
169+
{%unlessdoc.sub-pages==nil %}
170+
<ulclass="nav">
171+
{%forsectionindoc.sections %}
172+
<li>
173+
<ahref="#{{section.title |downcase |replace:'','-' }}">
174+
{{section.title }}
175+
</a>
176+
</li>
177+
{%endfor %}
178+
</ul>
179+
{%endunless %}
180+
181+
{%-endcomment -%}
182+
183+
</li>
184+
{%-endfor -%}
185+
</ul>
186+
</li>
187+
{%-endfor -%}
188+
</ul>
189+
</nav>

‎_includes/scripts.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<scripttype="module"src="{{ site.baseurl }}/assets/js/src/argohub-redirect.js"></script>
2+
13
<scriptsrc="{{ site.cdn.jquery }}"integrity="{{ site.cdn.jquery_hash }}"crossorigin="anonymous"></script>
24
<script>window.jQuery||document.write('<script src="{{ site.baseurl }}/assets/js/vendor/jquery.min.js"><\/script>')</script>
35

@@ -70,5 +72,3 @@
7072
}
7173
});
7274
</script>
73-
74-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp