def METHOD_NAME(self, dir):
    # load index.json
    with Path(dir, "index.json").open(encoding="UTF-8") as source:
        index = json.load(source)
    # load page content from markdown text files
    for tut in index:
        # get image paths
        file = Path(dir, "thumbnails/", tut["slug"] + ".png")
        if file.is_file():
            tut["thumbnail"] = str(file)
        else:
            tut["thumbnail"] = None
        # get body content if not external link
        if not tut["external"]:
            try:
                file = Path(dir, "content/", tut["slug"] + ".md")
                tut["body"] = file.read_text()
            except:
                logger.fatal("%s markdown file does not exist", tut["slug"])
    return index