Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated docs are missing #32

Open
ZhiyuanChen opened this issue Jun 5, 2024 · 1 comment
Open

Generated docs are missing #32

ZhiyuanChen opened this issue Jun 5, 2024 · 1 comment

Comments

@ZhiyuanChen
Copy link

Hi,

Thank you for this work!

I'm a bit lost when trying to use MkDocs-gen-files to build my doc site. Can I ask if you are keen to point out what mistakes I made?

Currently I have the following code in docs/generate.py

import os

import mkdocs_gen_files


def process_file(filename):
    with open(filename) as f:
        content = f.read()
    # headline_index = 0
    # for line in content:
    #     if line.startswith("# "):
    #         break
    #     headline_index += 1
    # content = content[headline_index:]

    filename = os.path.dirname(filename.removeprefix("multimolecule/")) + ".md"

    with mkdocs_gen_files.open(filename, "w") as file:
        print(content, file=file)

    mkdocs_gen_files.set_edit_path(filename, "gen_pages.py")


for root, _dirs, files in os.walk("multimolecule/models"):
    if "README.md" in files:
        process_file(os.path.join(root, "README.md"))

I have inspected that all files are successfully generated under mkdocs_gen_files.directory. But they are missing from then since.

You can find my full code at:

https://github.com/DLS5-Omics/multimolecule/tree/autodoc

The command I used to build the docs is mkdocs build -f docs/mkdocs.yml

@marioweid
Copy link

Running into same issue. Are there any updates on this topic ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants