Skip to content

Commit

Permalink
Update script to make thumbnails optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
ethib137 committed Feb 23, 2022
1 parent 8ee217f commit 9b3cbbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generateFragmentDocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ def write_field(file, langDict, field):
if "description" in fragmentJSONData:
collectionsReadmeFile.write(fragmentJSONData["description"] + "\n\n")

thumbnailPath = module + "/src/main/resources/META-INF/resources/thumbnails/" + fragmentJSONData["thumbnail"]
if "thumbnail" in fragmentJSONData:
thumbnailPath = module + "/src/main/resources/META-INF/resources/thumbnails/" + fragmentJSONData["thumbnail"]

collectionsReadmeFile.write("![Image of " + fragmentName + "](" + thumbnailPath + ")\n\n")
collectionsReadmeFile.write("![Image of " + fragmentName + "](" + thumbnailPath + ")\n\n")

if os.stat(fragment + "/index.json").st_size != 0:
indexJSON = open(fragment + "/index.json")
Expand Down

0 comments on commit 9b3cbbb

Please sign in to comment.