X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sphinx%2Fconf.py;h=7f5eb46b130430be1d9b4e9a49653a4f4ac0217f;hb=deaa2cbc66ebb34deaf6cfb371893f1b8e4d6684;hp=16125ab1087798935f432898dc1ffe52ec4df92a;hpb=6fbfc5c200bc52db0cc94cb7f7e86ee2a492042d;p=neurodebian.git diff --git a/sphinx/conf.py b/sphinx/conf.py index 16125ab..7f5eb46 100644 --- a/sphinx/conf.py +++ b/sphinx/conf.py @@ -21,6 +21,21 @@ import sys, os # absolute, like shown here. #sys.path.append(os.path.abspath('.')) +def artworkdir(): + """Look into every parent dir for 'artwork' and return its relative path.""" + level = 0 + while True: + target = os.path.join(*([os.path.pardir] * level + ['artwork'])) + if os.path.isdir(target): + return target + else: + level += 1 + # if there is no way up + if os.path.abspath(os.path.join(*([os.path.pardir] * level))) == \ + os.path.abspath(os.path.join(*([os.path.pardir] * (level + 1)))): + raise(ValueError, "Cannot find 'artwork'.") + + # General configuration # --------------------- @@ -105,7 +120,7 @@ html_title = project # The name of an image file (relative to this directory) to place at the top # of the sidebar. -html_logo = 'pics/neurodebian.png' +html_logo = os.path.join(artworkdir(), 'logo_tuned/fmri_w200.png') # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32