Skip to content

Commit

Permalink
Merge pull request #61 from eslam-gomaa/feat/document-new-kptop-funct…
Browse files Browse the repository at this point in the history
…ionalities

Feat/document new kptop functionalities
  • Loading branch information
eslam-gomaa authored Jun 30, 2024
2 parents f136fd8 + 181f0e7 commit 6215ee7
Show file tree
Hide file tree
Showing 109 changed files with 5,305 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
_site
156 changes: 156 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# https://github.com/just-the-docs/just-the-docs/blob/main/_config.yml

# theme: jekyll-theme-cayman
remote_theme: "just-the-docs/[email protected]" # https://github.com/just-the-docs/just-the-docs/releases
permalink: pretty

exclude:
# from https://github.com/jekyll/jekyll/blob/master/lib/site_template/_config.yml:
- .sass-cache/
- .jekyll-cache/
- gemfiles/
- Gemfile
- Gemfile.lock
- node_modules/
- vendor/bundle/
- vendor/cache/
- vendor/gems/
- vendor/ruby/
# specific to the theme website:
- bin/
- lib/
- "*.gemspec"
- "*.gem"
- LICENSE.txt
- package.json
- package-lock.json
- Rakefile
- README.md
- CODE_OF_CONDUCT.md
- docker-compose.yml
- Dockerfile
# theme test code
- fixtures/

search_enabled: true
search:
# Split pages into sections that can be searched individually
# Supports 1 - 6, default: 2
heading_level: 2
# Maximum amount of previews per search result
# Default: 3
previews: 2
# Maximum amount of words to display before a matched word in the preview
# Default: 5
preview_words_before: 3
# Maximum amount of words to display after a matched word in the preview
# Default: 10
preview_words_after: 3
# Set the search token separator
# Default: /[\s\-/]+/
# ample: enable support for hyphenated search words
tokenizer_separator: /[\s/]+/
# Display the relative url in search results
# Supports true (default) or false
rel_url: true
# Enable or disable the search button that appears in the bottom right corner of every page
# Supports true or false (default)
button: false

# For copy button on code
enable_copy_code_button: true

# By default, consuming the theme as a gem leaves mermaid disabled; it is opt-in
mermaid:
# Version of mermaid library
# Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/
version: "9.1.3"
# Put any additional configuration, such as setting the theme, in _includes/mermaid_config.js
# See also docs/ui-components/code
# To load mermaid from a local library, also use the `path` key to specify the location of the library; e.g.
# for (v10+):
# path: "/assets/js/mermaid.esm.min.mjs"
# for (<v10):
# path: "/assets/js/mermaid.min.js"
# Note: copy both `mermaid.esm.min.mjs` (v10+) or `mermaid.min.js` (<v10) and the associated `.map` file from the specified version of `mermaid/dist` to `/assets/js/`.

heading_anchors: true

# Aux links for the upper right navigation
aux_links:
"KPtop Docs on GitHub":
- "https://github.com/eslam-gomaa/kptop"

# Makes Aux links open in a new tab. Default is false
aux_links_new_tab: false

# Sort order for navigation links
# nav_sort: case_insensitive # default, equivalent to nil
nav_sort: case_sensitive # Capital letters sorted before lowercase

# External navigation links
# nav_external_links:
# - title: Just the Docs on GitHub
# url: https://github.com/just-the-docs/just-the-docs

nav_external_links:
- title: KPtop on GitHub
url: https://github.com/eslam-gomaa/kptop

# Back to top link
back_to_top: true
back_to_top_text: "Back to top"

footer_content: 'Copyright &copy; 2017-2020 Patrick Marsceill. Distributed by an <a href="https://github.com/just-the-docs/just-the-docs/tree/main/LICENSE.txt">MIT license.</a>'

# Footer last edited timestamp
last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter
last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html

# Footer "Edit this page on GitHub" link text
gh_edit_link: true # show or hide edit this page link
gh_edit_link_text: "Edit this page on GitHub"
gh_edit_repository: "https://github.com/just-the-docs/just-the-docs" # the github URL for your repo
gh_edit_branch: "main" # the branch that your docs is served from
# gh_edit_source: docs # the source that your files originate from
gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately

# Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define
color_scheme: nil

callouts_level: quiet # or loud
callouts:
highlight:
color: yellow
important:
title: Important
color: blue
new:
title: New
color: green
note:
title: Note
color: purple
warning:
title: Warning
color: red

plugins:
- jekyll-seo-tag
- jekyll-github-metadata
- jekyll-include-cache

kramdown:
syntax_highlighter_opts:
block:
line_numbers: false

compress_html:
clippings: all
comments: all
endings: all
startings: []
blanklines: false
profile: false
# ignore:
# envs: all
7 changes: 7 additions & 0 deletions docs/_includes/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pagination:
enabled: true
per_page: 9
permalink: '/page/:num/'
title: ':title - page :num'
sort_field: 'date'
sort_reverse: true
15 changes: 15 additions & 0 deletions docs/_includes/components/aux_nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<nav aria-label="Auxiliary" class="aux-nav">
<ul class="aux-nav-list">
{% for link in site.aux_links %}
<li class="aux-nav-list-item">
<a href="{{ link.last }}" class="site-button"
{% if site.aux_links_new_tab %}
target="_blank" rel="noopener noreferrer"
{% endif %}
>
{{ link.first }}
</a>
</li>
{% endfor %}
</ul>
</nav>
43 changes: 43 additions & 0 deletions docs/_includes/components/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{%- comment -%}
Include as: {%- include components/breadcrumbs.html -%}
Depends on: page, site.
Results in: HTML for the breadcrumbs component.
Overwrites:
pages_list, parent_page, grandparent_page.
{%- endcomment -%}

{%- if page.url != "/" and page.parent -%}

{%- assign pages_list = site[page.collection]
| default: site.html_pages
| where_exp: "item", "item.title != nil"
| where_exp: "item", "item.has_children != nil" -%}

{%- if page.grand_parent -%}
{%- assign parent_page = pages_list
| where: "title", page.parent
| where: "parent", page.grand_parent
| first -%}
{%- assign grandparent_page = pages_list
| where: "title", page.grand_parent
| first -%}
{%- else -%}
{%- assign parent_page = pages_list
| where: "title", page.parent
| where_exp: "item", "item.parent == nil"
| first -%}
{%- endif -%}

<nav aria-label="Breadcrumb" class="breadcrumb-nav">
<ol class="breadcrumb-nav-list">
{% if page.parent -%}
{%- if page.grand_parent %}
<li class="breadcrumb-nav-list-item"><a href="{{ grandparent_page.url | relative_url }}">{{ page.grand_parent }}</a></li>
{%- endif %}
<li class="breadcrumb-nav-list-item"><a href="{{ parent_page.url | relative_url }}">{{ page.parent }}</a></li>
{% endif -%}
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
</ol>
</nav>

{%- endif -%}
33 changes: 33 additions & 0 deletions docs/_includes/components/children_nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{%- comment -%}
Include as: {%- include components/children_nav.html -%}
Depends on: page, site.
Results in: HTML for the children-navigation component.
Includes:
sorted_pages.html
toc_heading_custom.html
Overwrites:
child_pages.
{%- endcomment -%}

{%- if page.has_children == true and page.has_toc != false -%}
{%- assign child_pages = site[page.collection]
| default: site.html_pages
| where: "parent", page.title
| where: "grand_parent", page.parent -%}

{%- include sorted_pages.html pages = child_pages -%}

{%- if page.child_nav_order == 'desc' or page.child_nav_order == 'reversed' -%}
{%- assign sorted_pages = sorted_pages | reverse -%}
{%- endif -%}
{%- endif -%}

<hr>
{% include toc_heading_custom.html %}
<ul>
{% for child in sorted_pages %}
<li>
<a href="{{ child.url | relative_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
</li>
{% endfor %}
</ul>
34 changes: 34 additions & 0 deletions docs/_includes/components/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% capture footer_custom %}
{%- include footer_custom.html -%}
{% endcapture %}
{% if footer_custom != "" or site.last_edit_timestamp or site.gh_edit_link %}
<hr>
<footer>
{% if site.back_to_top %}
<p><a href="#top" id="back-to-top">{{ site.back_to_top_text }}</a></p>
{% endif %}

{{ footer_custom }}

{% if site.last_edit_timestamp or site.gh_edit_link %}
<div class="d-flex mt-2">
{% if site.last_edit_timestamp and site.last_edit_time_format and page.last_modified_date %}
<p class="text-small text-grey-dk-000 mb-0 mr-2">
Page last modified: <span class="d-inline-block">{{ page.last_modified_date | date: site.last_edit_time_format }}</span>.
</p>
{% endif %}
{% if
site.gh_edit_link and
site.gh_edit_link_text and
site.gh_edit_repository and
site.gh_edit_branch and
site.gh_edit_view_mode
%}
<p class="text-small text-grey-dk-000 mb-0">
<a href="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}{% if site.gh_edit_source %}/{{ site.gh_edit_source }}{% endif %}{% if page.collection and site.collections_dir %}/{{ site.collections_dir }}{% endif %}/{{ page.path }}" id="edit-this-page">{{ site.gh_edit_link_text }}</a>
</p>
{% endif %}
</div>
{% endif %}
</footer>
{% endif %}
11 changes: 11 additions & 0 deletions docs/_includes/components/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div id="main-header" class="main-header">
{% if site.search_enabled != false %}
{% include components/search_header.html %}
{% else %}
<div></div>
{% endif %}
{% include header_custom.html %}
{% if site.aux_links %}
{% include components/aux_nav.html %}
{% endif %}
</div>
45 changes: 45 additions & 0 deletions docs/_includes/components/mermaid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{% comment %}
The complexity of this file comes from a breaking change in Mermaid v10; mermaid.init has been deprecated (and supposedly, didn't work earlier?).

So, we check whether the user's Mermaid version is >= 10; if not, we fall back to the previous init syntax.

If a user is using a custom mermaid file and doesn't specify a version, we default to the < v10 behaviour. Users who use version v10 or above should specify this in the version key.
{% endcomment %}

{% if site.mermaid.version %}
{% assign mermaid_major_version = site.mermaid.version | split: "." | first | plus: 0 %}
{% else %}
{% assign mermaid_major_version = 9 %}
{% endif %}

{% if mermaid_major_version > 9 %}

<script type="module">
{% if site.mermaid.path %}
import mermaid from '{{ site.mermaid.path | relative_url }}';
{% else %}
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@{{ site.mermaid.version }}/dist/mermaid.esm.min.mjs';
{% endif %}

var config = {% include mermaid_config.js %};
mermaid.initialize(config);
mermaid.run({
querySelector: '.language-mermaid',
});
</script>

{% else %}

{% if site.mermaid.path %}
<script src="{{ site.mermaid.path | relative_url }}"></script>
{% else %}
<script src="https://cdn.jsdelivr.net/npm/mermaid@{{ site.mermaid.version }}/dist/mermaid.min.js"></script>
{% endif %}

<script>
var config = {% include mermaid_config.js %};
mermaid.initialize(config);
window.mermaid.init(undefined, document.querySelectorAll('.language-mermaid'));
</script>

{% endif %}
7 changes: 7 additions & 0 deletions docs/_includes/components/search_footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if site.search.button %}
<button id="search-button" class="search-button btn-reset" aria-label="Focus on search">
<svg viewBox="0 0 24 24" class="icon" aria-hidden="true"><use xlink:href="#svg-search"></use></svg>
</button>
{% endif %}

<div class="search-overlay"></div>
9 changes: 9 additions & 0 deletions docs/_includes/components/search_header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% capture search_placeholder %}{% include search_placeholder_custom.html %}{% endcapture %}

<div class="search" role="search">
<div class="search-input-wrap">
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="{{ search_placeholder | strip_html | strip }}" aria-label="{{ search_placeholder | strip_html| strip }}" autocomplete="off">
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
</div>
<div id="search-results" class="search-results"></div>
</div>
Loading

0 comments on commit 6215ee7

Please sign in to comment.