{"id":22325928,"url":"https://github.com/kristofhracza/docgen","last_synced_at":"2025-09-05T19:48:47.707Z","repository":{"id":224833807,"uuid":"764352764","full_name":"kristofhracza/DocGen","owner":"kristofhracza","description":"Documentation Platform","archived":false,"fork":false,"pushed_at":"2024-03-07T13:55:42.000Z","size":371,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T11:48:15.477Z","etag":null,"topics":["content-platform","documentation","documentation-generator","documentation-tool","md-file-converter","md-to-html","webhosting"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kristofhracza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-27T23:21:44.000Z","updated_at":"2024-02-27T23:24:10.000Z","dependencies_parsed_at":"2024-03-07T14:56:23.050Z","dependency_job_id":null,"html_url":"https://github.com/kristofhracza/DocGen","commit_stats":null,"previous_names":["kristofhracza/docgen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kristofhracza/DocGen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristofhracza%2FDocGen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristofhracza%2FDocGen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristofhracza%2FDocGen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristofhracza%2FDocGen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kristofhracza","download_url":"https://codeload.github.com/kristofhracza/DocGen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristofhracza%2FDocGen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273812693,"owners_count":25172882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["content-platform","documentation","documentation-generator","documentation-tool","md-file-converter","md-to-html","webhosting"],"created_at":"2024-12-04T02:14:29.061Z","updated_at":"2025-09-05T19:48:47.656Z","avatar_url":"https://github.com/kristofhracza.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocGen\nThe poor man's documentation platform\n\n## What is this?\nDocGen converts MD files to HTML whilst placing them into an environment that is suitable for web hosting.\n\n![Demo image](screenshot.png)\n\n## Setup\nFirst, you're going to have to edit the `PUBLIC_FOLDER` variable in `.env` *(unless you're happy with the default name)*.\nThis will be your main folder for the website\n\nThough keep in mind, that if you change `PUBLIC_FOLDER`, you're going to have to change the name of the `site` folder.\n\n1. Download dependencies `pip install -r requirements.txt`\n2. If you need any more assets linked, make sure to edit\n    ```python\n    # Edit this if you need more\n    ASSESTS = '''\n    \u003clink rel=\"stylesheet\" href=\"{0}assets/style.css\"\u003e\n    \u003clink rel=\"stylesheet\" href=\"{0}assets/prism.css\"\u003e\n    \u003cscript type=\"text/javascript\" src=\"{0}assets/prism.js\"\u003e\u003c/script\u003e\n    '''\n    ```\n    this part of the python code.\n3. Move your `.md` files to this project, they don't have to be in a folder, but the structure is much nicer if they are.\n4. Setup `SUMMARY.json` according to your `.md` file structure *(more on that later)*\n5. Run `docgen.py`, and if everything is fine, your files should be converted and added to `PUBLIC_FOLDER`.\n\n### SUMMARY.json\nIn this file you will write the structure of your files.\n\n#### Example\n```json\n{\n    \"README\":\"md/README.md\",\n    \"First\":{\n        \"MAIN\":\"some/path/to/md/file\",\n        \"Sub-heading\":{\n            \"MAIN\":\"some/path/to/md/file\",\n        },\n    },\n    \"Second\":{\n        \"Feature one\":\"some/path/to/md/file\",\n        \"Feature two\":\"some/path/to/md/file\"\n    }\n}\n```\nThe example above would produce following structure:\n- README\n- First\n    - Sub-heading\n- Second\n    - Feature one\n    - Feature two\n\nThe entries labeled as `MAIN` should be files that describe the sub-header.      \n\n## PUBLIC_FOLDER structure\nAny file that is in the `PUBLIC_FOLDER` directory has a purpose.\n\nThey can be edited or even deleted, but be aware that their modification or deletion could result in an error / bug.\n\n\n## PrismJS\nFor code highlight I've used `PrismJS`.\n\nThe `prism.js` file in the `assets` folder, is from an [online generator](https://prismjs.com/download.html#themes=prism\u0026languages=markup+css+clike+javascript).        \nHowever, the `prism.css` file is taken from [Github](https://github.com/PrismJS/prism-themes/blob/master/themes/prism-one-dark.css), the theme is *One Dark*.\n\n## How does all the content get rendered?\nThis is a very janky soultion, but in the `index.html` file there's an `iframe` element.        \nWhen a list element in the sidebar is clicked, it has a corresponding link and will add that to the `iframe`.\n```js\nif (isMain === false) newText.onclick = () =\u003e {\n    document.getElementById(\"page-render\").src = url;\n    document.title = \"DocGen \" + text;\n    localStorage.setItem(\"lastPage\",url)\n}\n```\nThe last page will be saved to local storage, and will be rendered upon re-freshing or re-opening the page.\n\n### LINKS.json\nYou don't have to worry about that, it's just output from `docgen.py` that will be used in `loader.js`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristofhracza%2Fdocgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkristofhracza%2Fdocgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristofhracza%2Fdocgen/lists"}