[docs] generate extra node doc with custom extension

This commit is contained in:
Loïc Vital 2022-10-12 18:25:10 +02:00
parent e022b377c4
commit cec2c79d6a
7 changed files with 102 additions and 13 deletions

View file

@ -38,14 +38,10 @@ class Relinker(SparseNodeVisitor):
class FetchMd(Directive):
required_arguments = 2
def arg_path(self):
if self.arguments[0] == ':file:':
return self.arguments[1]
required_arguments = 1
def run(self):
path = os.path.abspath(os.getenv('PROJECT_DIR') + '/' + self.arg_path())
path = os.path.abspath(os.getenv('PROJECT_DIR')+'/'+self.arguments[0])
result = []
try:
with open(path) as file: