{"id":15046002,"url":"https://github.com/denoland/deno_doc","last_synced_at":"2026-02-03T01:09:34.499Z","repository":{"id":37573347,"uuid":"288456896","full_name":"denoland/deno_doc","owner":"denoland","description":"Documentation generator for Deno","archived":false,"fork":false,"pushed_at":"2024-10-28T21:40:07.000Z","size":84678,"stargazers_count":261,"open_issues_count":41,"forks_count":55,"subscribers_count":23,"default_branch":"main","last_synced_at":"2024-10-29T15:46:49.363Z","etag":null,"topics":["deno","documentation"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denoland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-08-18T12:59:53.000Z","updated_at":"2024-10-28T21:40:10.000Z","dependencies_parsed_at":"2024-03-25T08:44:11.508Z","dependency_job_id":"3d9dbff8-20cc-42a6-909f-c58957567acb","html_url":"https://github.com/denoland/deno_doc","commit_stats":{"total_commits":563,"total_committers":39,"mean_commits":"14.435897435897436","dds":0.7673179396092362,"last_synced_commit":"df2b9d44731c9e6bec561ed342c245a061f3d6c9"},"previous_names":[],"tags_count":301,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denoland%2Fdeno_doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denoland%2Fdeno_doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denoland%2Fdeno_doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denoland%2Fdeno_doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denoland","download_url":"https://codeload.github.com/denoland/deno_doc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688536,"owners_count":21145764,"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","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":["deno","documentation"],"created_at":"2024-09-24T20:52:34.395Z","updated_at":"2026-02-03T01:09:34.494Z","avatar_url":"https://github.com/denoland.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# `deno_doc`\n\n[![](https://img.shields.io/crates/v/deno_doc.svg)](https://crates.io/crates/deno_doc)\n[![JSR](https://jsr.io/badges/@deno/doc)](https://jsr.io/@deno/doc)\n\nA Rust crate to generate documentation for JavaScript and TypeScript modules.\n\nThis crate powers\n[`deno doc`](https://deno.land/manual/tools/documentation_generator), but is not\nDeno specific and can be used to write documentation generators for other\ntargets like Node or the browser as well.\n\n## Usage from Deno CLI or Deploy\n\nSee [js/README.md](js/README.md).\n\n## Rust Example\n\n`examples/ddoc/main.rs` provides a minimal standalone binary demonstrating how\n`deno_doc` can be used as a crate.\n\n```shell\n$ cargo run --example ddoc ../deno_std/http/mod.ts\n```\n\n## Developing\n\n```shell\n# build all targets\n$ cargo build --all-targets\n\n# test it\n$ cargo test\n\n# build js api\n$ deno task build\n\n# test it\n$ deno task test\n```\n\n### HTML generation\n\nIf you want to work on the HTML generation aspect of deno_doc, these things will\nhelp you:\n\n`deno task tailwind`: this regenerates the transpiled tailwind from the css\nfiles and mentions of classes across the codebases, be it in rust files or js\nfiles. This needs to always be run to do any updates to the styling.\n\n`deno task gen_html`: This generates a `generated_docs` directory which is the\nHTML output based on the provided files.\n\n`deno task debug`: this calls the above tailwind task, and then the gen_html\ntask with all the files from `tests/testdata/multiple` passed.\n\nWe recommend to use these tasks above to develop features or debug things,\nrather than recompiling a dependent on this system, as it is much faster\niteration and easier to debug.\n\nWe use [insta](https://github.com/mitsuhiko/insta) testing tool for taking\nsnapshots of the html output. If you change the rendering of html output, or\nchange the fixture files for html testing, you need to update snapshot using\n[cargo-insta](https://insta.rs/docs/quickstart/) command.\n\n```\n# update snapshots\ncargo insta test\n\n# review snapshots\ncargo insta review\n```\n\nSee [the insta docs](https://insta.rs/docs/quickstart/) for more details.\n\n### HTML Internal structure\n\nMost of the HTML generated, except if its in very small fragments (ie a single\nelement or two) is located in `src/html/templates`. This is also where scripts,\nCSS and icons live. The `page` directory in it is an extension to that which\nonly relates to generation of a full-fledged documentation page (like\n`deno doc`), and is not used when just generating fragments (like\nhttps://jsr.io).\n\nRendering of a symbol is done in the `src/html/symbols` directory, in the\ncorresponding file depending on the type of the symbol. Namespace is a special\ncase as in it is used for things besides namespaces, for example the \"all\nsymbols\" page.\n\nA collection of symbols that refer to the same symbol identifier (like lets say\nhaving a class and namespace with the same name of `MySymbol`), are called a\n\"symbol group\".\n\nThe markdown rendering is pluggable and a default renderer is available via the\n`comrak` feature which enables a default markdown renderer using the crate with\nthe same name.\n\nA internal struct is `ShortPath`, which is a wrapper around a `Url` instance\nwith some additional information, including the display value and if it is the\nmain entrypoint. In addition to this struct, we have another wrapper struct\nnamed `DocNodeWithContext`, which contains a `DocNode` and information related\nto it, like a resolved identifier for representing its name in a namespace, and\nalso data related to \"property drilldown\".\n\nProperty drilldown is what we call being able to view properties, methods and\nother accessors on classes, interfaces and applicable variables and type\naliases. It however does not refer to an item in a namespace, as those have\ntheir unique handling.\n\n## Contributing\n\n- If you are going to work on an issue, mention so in the issue comments\n  _before_ you start working on the issue.\n\n- Please be professional in the forums. See our\n  [Code of Conduct](https://github.com/denoland/deno/blob/main/.github/CODE_OF_CONDUCT.md).\n\n- Ask for help in the [community chat room](https://discord.gg/deno).\n\n## Submitting a Pull Request\n\nBefore submitting, please make sure the following is done:\n\n1. That there is a related issue and it is referenced in the PR text.\n2. There are tests that cover the changes.\n3. Ensure `cargo test` and `deno task test` passes.\n4. Format your code with `rustfmt --check src/lib.rs`\n5. Make sure `cargo clippy --all-targets --release --locked -- -D clippy::all`\n   passes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenoland%2Fdeno_doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenoland%2Fdeno_doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenoland%2Fdeno_doc/lists"}