diff --git a/docs/build.py b/docs/build.py index 7e44c6592..5f2ebc0d0 100755 --- a/docs/build.py +++ b/docs/build.py @@ -23,12 +23,13 @@ def cmd(s): # Get the current branch name status, br = subprocess.getstatusoutput("git branch | grep '*'") +gitcommit = subprocess.getstatusoutput("git rev-parse HEAD") br = re.sub('\* ', '', br) urlpath = re.sub('release/', '', br) # Be sure the github links point to the right branch f = open("header.rst", "w") -f.write(".. |github_link_base| replace:: https://github.com/lvgl/lvgl/blob/docs/" + br) +f.write(".. |github_link_base| replace:: https://github.com/lvgl/lvgl/blob/" + gitcommit + "/docs") f.close() base_html = "html_baseurl = 'https://docs.lvgl.io/" + urlpath + "/en/html/'"