Skip to content

Commit

Permalink
Direct Github link to a specific notebook (#20364)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgolebiewski-intel authored Oct 13, 2023
1 parent 5004f55 commit 8af1f18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/nbdoc/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

repo_name = "openvino_notebooks"

repo_branch = "tree/main"

artifacts_link = "http://repository.toolbox.iotg.sclab.intel.com/projects/ov-notebook/0.1.0-latest/20230517220809/dist/rst_files/"

blacklisted_extensions = ['.xml', '.bin']
Expand All @@ -34,7 +36,7 @@
.. |github_link| raw:: html
<a href="https://github.com/{{ owner }}/{{ repo }}" target="_blank"><img src="https://badgen.net/badge/icon/github?icon=github&label" alt="Github"></a>
<a href="https://github.com/{{ owner }}/{{ repo }}/{{ branch }}/{{ folder }}/{{ notebook }}" target="_blank"><img src="https://badgen.net/badge/icon/github?icon=github&label" alt="Github"></a>
\n
"""
Expand All @@ -50,7 +52,7 @@
.. |github_link| raw:: html
<a href="https://github.com/{{ owner }}/{{ repo }}" target="_blank"><img src="https://badgen.net/badge/icon/github?icon=github&label" alt="Github"></a>
<a href="https://github.com/{{ owner }}/{{ repo }}/{{ branch }}/{{ folder }}/{{ notebook }}" target="_blank"><img src="https://badgen.net/badge/icon/github?icon=github&label" alt="Github"></a>
\n
"""
Expand Down
2 changes: 2 additions & 0 deletions docs/nbdoc/nbdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
no_binder_template,
repo_directory,
repo_name,
repo_branch,
repo_owner,
rst_template,
section_names,
Expand Down Expand Up @@ -96,6 +97,7 @@ def __init__(self, nb_path: str = notebooks_path):
"owner": repo_owner,
"repo": repo_name,
"folder": repo_directory,
"branch": repo_branch,
}

def fetch_binder_list(self, file_format: str = 'txt') -> list:
Expand Down

0 comments on commit 8af1f18

Please sign in to comment.