Skip to content

Commit

Permalink
chore: updating docs config
Browse files Browse the repository at this point in the history
pointing at main branch
  • Loading branch information
JimTools committed Jun 7, 2024
1 parent 77c4197 commit 1b4addf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def main():
os.environ["pages_root"] = "https://jimtools.github.io/jwt-auth/"

# manually the main branch build in the current supported languages
build_doc("latest", "en", "better-docs") # @todo update later
build_doc("latest", "en", "main")
move_dir("./_build/html/", "../pages/")

# reading the yaml file
Expand All @@ -30,8 +30,8 @@ def build_doc(version, language, tag):
os.environ["current_version"] = version
os.environ["current_language"] = language
subprocess.run("git checkout " + tag, shell=True)
subprocess.run("git checkout better-docs -- conf.py", shell=True) # @todo update with 2.x later
subprocess.run("git checkout better-docs -- versions.yaml", shell=True) # @todo update with 2.x later
subprocess.run("git checkout main -- conf.py", shell=True)
subprocess.run("git checkout main -- versions.yaml", shell=True)
subprocess.run("doxygen Doxyfile", shell=True)
os.environ['SPHINXOPTS'] = "-D language='{}'".format(language)
subprocess.run("make html", shell=True)
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
html_context = {
"current_language": current_language,
"languages": [
{"name": 'en', "url": pages_root+'/'+current_version+'/'+language},
{"name": 'en', "url": current_version+'/'+language},
],
"current_version": { "name": current_version },
"versions": {
Expand All @@ -66,7 +66,7 @@
if(found is None):
html_context['languages'].append({
"name": language,
"url": pages_root+'/'+current_version+'/'+language,
"url": current_version+'/'+language,
})

for version, details in docs.items():
Expand All @@ -75,5 +75,5 @@

html_context['versions']['tags'].append({
"name": version,
"url": pages_root+'/'+version+'/'+current_language,
"url": version+'/'+current_language,
})
2 changes: 1 addition & 1 deletion docs/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
- "en"
"2.0":
tag: "2.x"
languages:
languages:
- "en"

0 comments on commit 1b4addf

Please sign in to comment.