{"_id":"@alandefreitas/antora-cpp-tagfiles-extension","_rev":"3-882926b8b92b639da0b4d06467d37096","name":"@alandefreitas/antora-cpp-tagfiles-extension","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@alandefreitas/antora-cpp-tagfiles-extension","version":"0.0.1","keywords":["antora","extension","c++","reference","documentation"],"author":{"name":"Alan de Freitas"},"license":"BSL-1.0","_id":"@alandefreitas/antora-cpp-tagfiles-extension@0.0.1","maintainers":[{"name":"alandefreitas","email":"alandefreitas@gmail.com"}],"homepage":"https://github.com/alandefreitas/antora-cpp-tagfiles-extension#readme","bugs":{"url":"https://github.com/alandefreitas/antora-cpp-tagfiles-extension/issues"},"dist":{"shasum":"461003f9e8fa22f7084d2800a8a57cde8f15e525","tarball":"https://registry.npmjs.org/@alandefreitas/antora-cpp-tagfiles-extension/-/antora-cpp-tagfiles-extension-0.0.1.tgz","fileCount":13,"integrity":"sha512-IX4zPT/T3ldpzdS+2WmDiN5jWpTVDFwkgKeoyjyppKZAUQ7LtECKwn8N5y962U5ZfwqClQcfcY130Lhb6Kyy2g==","signatures":[{"sig":"MEUCIQCi4WQnC+28+xUwUXGnz+mUpCYnEsfL6Sw+y1xUALSOVQIgIHCKIxh2YkrEQqht1hcMmQDYg+RvdXOiA8cSajB3qH4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2277742},"main":"lib/extension.js","gitHead":"ba85626fbdc2ec6c169182cfacad95770546b0c2","scripts":{"test":"node --test"},"_npmUser":{"name":"alandefreitas","email":"alandefreitas@gmail.com"},"repository":{"url":"git+https://github.com/alandefreitas/antora-cpp-tagfiles-extension.git","type":"git"},"_npmVersion":"10.7.0","description":"C++ Tagfiles Extension for Antora","directories":{},"_nodeVersion":"20.15.1","dependencies":{"he":"^1.2.0","fast-xml-parser":"^4.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/antora-cpp-tagfiles-extension_0.0.1_1721950130240_0.7800026174710022","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.2":{"name":"@alandefreitas/antora-cpp-tagfiles-extension","version":"0.0.2","keywords":["antora","extension","c++","reference","documentation"],"author":{"name":"Alan de Freitas"},"license":"BSL-1.0","_id":"@alandefreitas/antora-cpp-tagfiles-extension@0.0.2","maintainers":[{"name":"alandefreitas","email":"alandefreitas@gmail.com"}],"homepage":"https://github.com/alandefreitas/antora-cpp-tagfiles-extension#readme","bugs":{"url":"https://github.com/alandefreitas/antora-cpp-tagfiles-extension/issues"},"dist":{"shasum":"f83d39c6b77cfe0d0d1f3aa0d9aefeecc3bfdb24","tarball":"https://registry.npmjs.org/@alandefreitas/antora-cpp-tagfiles-extension/-/antora-cpp-tagfiles-extension-0.0.2.tgz","fileCount":14,"integrity":"sha512-Dw8PrtxL6eA3x0bK7upi2n80dha/mDjsZ5QnCRQGdU1BMxzdl8RJMjDbxRJK/wGJcqxGtOFaG9UslhRxHJ91Uw==","signatures":[{"sig":"MEYCIQDhP7aWMd+8wRU7JN0JHKEJed6fgbLlyC4tV0LYSWaXCQIhAJ7kkJslQ9ApV5xdBNoDb8amopo8drnUiIwIJexzz+Lb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2289647},"main":"lib/extension.js","gitHead":"ed5d3fe2feb46c67f9d19f4792cb93387f0fd261","scripts":{"test":"node --test"},"_npmUser":{"name":"alandefreitas","email":"alandefreitas@gmail.com"},"repository":{"url":"git+https://github.com/alandefreitas/antora-cpp-tagfiles-extension.git","type":"git"},"_npmVersion":"10.7.0","description":"C++ Tagfiles Extension for Antora","directories":{},"_nodeVersion":"20.15.1","dependencies":{"he":"^1.2.0","fast-xml-parser":"^4.4.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/antora-cpp-tagfiles-extension_0.0.2_1722369858085_0.18244091074498336","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.3":{"name":"@alandefreitas/antora-cpp-tagfiles-extension","version":"0.0.3","keywords":["antora","extension","c++","reference","documentation"],"author":{"name":"Alan de Freitas"},"license":"BSL-1.0","_id":"@alandefreitas/antora-cpp-tagfiles-extension@0.0.3","maintainers":[{"name":"alandefreitas","email":"alandefreitas@gmail.com"}],"homepage":"https://github.com/alandefreitas/antora-cpp-tagfiles-extension#readme","bugs":{"url":"https://github.com/alandefreitas/antora-cpp-tagfiles-extension/issues"},"dist":{"shasum":"51b129ecc8b98d9c00ef6cb252ae061e23f09838","tarball":"https://registry.npmjs.org/@alandefreitas/antora-cpp-tagfiles-extension/-/antora-cpp-tagfiles-extension-0.0.3.tgz","fileCount":14,"integrity":"sha512-BfIJuZaT8K0v2wNnGdGVjPhBZEjAwUaDJnkXtKYzDoPaY4WpsnVyqTuGxFyvZGr+jtpqPfh81l2x7SXFo9UOHg==","signatures":[{"sig":"MEYCIQCGkGVhGvwLuTxBj14MqQVDbHaYFe09x5c9DMyngBBllgIhAJ899Z625kpDW4Q/isD/33G8Go8aMYOe+t/k/ZuTcAVv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2317656},"main":"lib/extension.js","gitHead":"7d200a61e4eb967f1c3ca50d5c8942868dd12c3b","scripts":{"test":"node --test"},"_npmUser":{"name":"alandefreitas","email":"alandefreitas@gmail.com"},"repository":{"url":"git+https://github.com/alandefreitas/antora-cpp-tagfiles-extension.git","type":"git"},"_npmVersion":"10.8.2","description":"C++ Tagfiles Extension for Antora","directories":{},"_nodeVersion":"20.17.0","dependencies":{"he":"^1.2.0","isomorphic-git":"^1.27.1","cache-directory":"^2.0.0","fast-xml-parser":"^4.4.1","@antora/expand-path-helper":"^2.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/antora-cpp-tagfiles-extension_0.0.3_1726007899496_0.37281093003809596","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2024-07-25T23:28:50.056Z","modified":"2024-09-24T21:50:56.691Z","0.0.1":"2024-07-25T23:28:50.419Z","0.0.2":"2024-07-30T20:04:18.274Z","0.0.3":"2024-09-10T22:38:19.824Z"},"bugs":{"url":"https://github.com/alandefreitas/antora-cpp-tagfiles-extension/issues"},"author":{"name":"Alan de Freitas"},"license":"BSL-1.0","homepage":"https://github.com/alandefreitas/antora-cpp-tagfiles-extension#readme","keywords":["antora","extension","c++","reference","documentation"],"repository":{"url":"git+https://github.com/alandefreitas/antora-cpp-tagfiles-extension.git","type":"git"},"description":"C++ Tagfiles Extension for Antora","maintainers":[{"name":"alandefreitas","email":"alandefreitas@gmail.com"}],"readme":"This extension allows you to use tagfiles with\nC` symbols in your Antora projects. Tagfiles are usually generated by Doxygen and contain information about the symbols in your C`\ncodebase.\n\n``` {.asciidoc}\ncpp:std::vector[]\n```\n\nThis will render as a link to the `std::vector` class in the tagfile.\n\n``` {.asciidoc}\nhttps://en.cppreference.com/w/cpp/container/vector[std::vector,window=\"_blank\"]\n```\n\nWhich renders as\n`https://en.cppreference.com/w/cpp/container/vector[std::vector,window=\"_blank\"]`.\n\nThe extension supports fundamental types, custom tagfiles, using\nnamespaces directives, template parameters, nested symbols, and\nreplacing target names.\n\nConfiguration {#_configuration}\n=============\n\nnpm {#_npm}\n---\n\nInstall this extension\n\n``` {.bash}\nnpm i -D @alandefreitas/antora-cpp-tagfiles-extension\n```\n\nPlaybook {#_playbook}\n--------\n\nAppend the following in your `antora-playbook.yaml`:\n\n``` {.yaml}\nantora:\n  extensions:\n    - require: '@alandefreitas/antora-cpp-tagfiles-extension' # \n      cpp-tagfiles:\n          files: # \n            - file: ./doc/tagfiles/boost-url-doxygen.tag.xml\n              base_url: 'xref:reference:'\n            - file: ./doc/tagfiles/boost-system-doxygen.tag.xml\n              base_url: https://www.boost.org/doc/libs/master/libs/system/doc/html/\n            - file: ./doc/tagfiles/boost-core-doxygen.tag.xml\n              base_url: https://www.boost.org/doc/libs/master/libs/core/doc/html/\n            - file: ./doc/tagfiles/boost-filesystem-doxygen.tag.xml\n              base_url: https://www.boost.org/doc/libs/master/libs/filesystem/doc/\n          using-namespaces: \n            - boost::urls\n            - boost::urls::grammar\n            - boost::system\n            - boost::core\n```\n\n-   \\<1\\> `npm` package name:\n    `@alandefreitas/antora-cpp-tagfiles-extension` (required)\n\n-   \\<2\\> List of tagfiles to be used by the extension\n\n-   \\<3\\> List of namespaces to be used by the extension\n\nComponents {#_components}\n----------\n\nComponents can also set their own tagfiles. Append following in your\n`antora.yaml`:\n\n``` {.yaml}\next:\n  cpp-tagfiles: # \n      files: # \n        - file: ./doc/tagfiles/boost-url-doxygen.tag.xml\n          base_url: 'xref:reference:'\n        - file: ./doc/tagfiles/boost-system-doxygen.tag.xml\n          base_url: https://www.boost.org/doc/libs/master/libs/system/doc/html/\n        - file: ./doc/tagfiles/boost-core-doxygen.tag.xml\n          base_url: https://www.boost.org/doc/libs/master/libs/core/doc/html/\n        - file: ./doc/tagfiles/boost-filesystem-doxygen.tag.xml\n          base_url: https://www.boost.org/doc/libs/master/libs/filesystem/doc/\n      using-namespaces: \n        - boost::urls\n        - boost::urls::grammar\n        - boost::system\n        - boost::core\n```\n\n-   \\<1\\> The playbook needs to have the extension enabled\n\n-   \\<2\\> List of tagfiles to be used by the component\n\n-   \\<3\\> List of namespaces to be used by the component\n\nThese tagfiles only affect the component where they are defined.\n\nC++ Reference {#_c_reference}\n-------------\n\nThe extension include the cppreference tagfile by default. Any unknown\nsymbol in custom tagfiles will be searched in the cppreference tagfile.\n\nFeatures {#_features}\n========\n\nUnknown symbols {#_unknown_symbols}\n---------------\n\nIf the extension can't find a symbol in the tagfile, it will render the\nsymbol as plain text.\n\n``` {.asciidoc}\ncpp:unknown[]\n```\n\nThis will render as plain text:\n\n``` {.asciidoc}\n`unknown`\n```\n\nWhich renders as `unknown`.\n\nFundamental types {#_fundamental_types}\n-----------------\n\nFundamental types include links to cppreference:\n\n``` {.asciidoc}\ncpp:int[]\n```\n\nThis will render as a link to the `int` fundamental type in\ncppreference.\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/language/types#Standard_integer_types[int,window=\"_blank\"]`\n```\n\nWhich renders as\n`https://en.cppreference.com/w/cpp/language/types#Standard_integer_types[int,window=\"_blank\"]`.\n\nSymbols from Tagfiles {#_symbols_from_tagfiles}\n---------------------\n\nSymbols from tagfiles are rendered as links:\n\n``` {.asciidoc}\ncpp:std::string[]\n```\n\nThis will render as a link to the `std::string` class in the\ncppreference tagfile.\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/string/basic_string[std::string,window=\"_blank\"]`\n```\n\nWhich renders as\n`https://en.cppreference.com/w/cpp/string/basic_string[std::string,window=\"_blank\"]`.\n\nTemplate classes without parameters are also supported:\n\n``` {.asciidoc}\ncpp:std::vector[]\n```\n\nThis will render as a link to the `std::vector` class in the\ncppreference tagfile.\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/container/vector[std::vector,window=\"_blank\"]`\n```\n\nWhich renders as\n`https://en.cppreference.com/w/cpp/container/vector[std::vector,window=\"_blank\"]`.\n\nSymbols from custom tagfiles are rendered without the `window=\"_blank\"`\nattribute if the `base_url` relative.\n\n``` {.asciidoc}\ncpp:is_charset[]\n```\n\nThis will render as a link to the `boost::urls::grammar::is_charset`\nclass in the `boost-url-doxygen.tag.xml` tagfile.\n\n``` {.asciidoc}\n`xref:reference:boost/urls/grammar/is_charset.adoc[boost::urls::grammar::is_charset]`\n```\n\nComponents {#_components_2}\n----------\n\nWhen components define their own tagfiles, these tagfiles only affect\nthe component where they are defined and they have precedence over\ntagfiles defined in the playbook.\n\n``` {.asciidoc}\ncpp:boost::urls::string_token::assign_to[]\n```\n\nThis will render as a link to the `boost::urls::string_token::assign_to`\nclass in the `boost-url-doxygen.tag.xml` tagfile.\n\n``` {.asciidoc}\n`xref:reference:boost/urls/string_token/assign_to.adoc[boost::urls::string_token::assign_to]`\n```\n\nHowever, if the some other component uses `cpp:` for the same symbol\nwithout the appropriate tagfile, the symbol will be rendered as plain\ntext.\n\n``` {.asciidoc}\n`boost::urls::string_token::assign_to`\n```\n\nNamespaces {#_namespaces}\n----------\n\nDefault namespaces can also be defined in the playbook or in the\ncomponent. When there's no match for the full symbol, the extension will\ntry to find the symbol in the namespaces. Assuming\n`boost::urls::grammar` is defined in the playbook or the component:\n\n``` {.asciidoc}\ncpp:boost::urls::grammar::is_charset[]\ncpp:is_charset[]\n```\n\nThis will render as a link to the `boost::urls::grammar::is_charset`\nclass in the `boost-url-doxygen.tag.xml` tagfile. However, the link text\nwill be whatever was provided to the extension.\n\n``` {.asciidoc}\n`xref:reference:boost/urls/grammar/is_charset.adoc[boost::urls::grammar::is_charset]`\n`xref:reference:boost/urls/grammar/is_charset.adoc[is_charset]`\n```\n\nAs with tagfiles, the namespaces defined in a component only affect that\ncomponent. The namespace `std::` can also be defined:\n\n``` {.asciidoc}\ncpp:std::string[]\ncpp:string[]\n```\n\nThis will render as a link to the `std::string` class in the\ncppreference tagfile.\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/string/basic_string[std::string,window=\"_blank\"]`\n`https://en.cppreference.com/w/cpp/string/basic_string[string,window=\"_blank\"]`\n```\n\nTemplate parameters {#_template_parameters}\n-------------------\n\nTemplate parameters are supported. The extension will also include links\nfrom the tagfile for the template parameters.\n\n``` {.asciidoc}\ncpp:std::vector<int>[]\n```\n\nThis will render as a link to the `std::vector<int>` class in the\ncppreference tagfile.\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/container/vector[std::vector,window=\"_blank\"]<https://en.cppreference.com/w/cpp/language/types#Standard_integer_types[int,window=_blank]>`\n```\n\nWhich renders as\n`https://en.cppreference.com/w/cpp/container/vector[std::vector,window=\"_blank\"]<https://en.cppreference.com/w/cpp/language/types#Standard_integer_types[int,window=_blank]>`.\n\nSymbols from custom tagfiles can also be used with template parameters:\n\n``` {.asciidoc}\ncpp:std::vector<url_view>[]\n```\n\nThis will render as a link to the `std::vector<url_view>` class in the\ncppreference tagfile.\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/container/vector[std::vector,window=\\\"_blank\\\"]&#x3C;url_view&#x3E;`\n```\n\nWhich renders as\n`https://en.cppreference.com/w/cpp/container/vector[std::vector,window=\"blank\"]<url_view>`.\n\nIf the namespace `boost::urls` is being used in the context, it will\nalso be used to resolve `url_view`:\n\n``` {.asciidoc}\ncpp:std::vector<url_view>[]\n```\n\nThis will render as a link to the `std::vector<url_view>` class in the\ncppreference tagfile.\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/container/vector[std::vector,window=\\\"_blank\\\"]&#x3C;xref:reference:boost/urls/url_view.adoc[url_view]&#x3E;`\n```\n\nNested symbols {#_nested_symbols}\n--------------\n\nThe extension supports nested symbols:\n\n``` {.asciidoc}\ncpp:boost::urls::url_view_base::segments[]\n```\n\nThis will render as a link to the `boost::urls::url_view_base::segments`\nclass in the `boost-url-doxygen.tag.xml` tagfile.\n\n``` {.asciidoc}\n`xref:reference:boost/urls/url_view_base/segments.adoc[boost::urls::url_view_base::segments]`\n```\n\nWhich is the page for the `boost::urls::url_view_base::segments` symbol\ndefined in the tagfile rather than only `boost::urls::url_view_base`.\n\nSometimes there's no page for the nested symbol in the tagfile, so the\nlink will redirect to the page for the parent symbol.\n\n``` {.asciidoc}\ncpp:std::vector::iterator[]\n```\n\nThis will render as a link to the `std::vector` class in the\ncppreference tagfile:\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/container/vector[std::vector::iterator,window=\\\"_blank\\\"]`\n```\n\nWhich renders as\n`https://en.cppreference.com/w/cpp/container/vector[std::vector::iterator,window=\"blank\"]`.\n\nNote that there's no page for `std::vector::iterator` in cppreference,\nso the link will redirect to the page for the parent `std::vector`\nsymbol.\n\nTemplates and nested symbols can also be combined:\n\n``` {.asciidoc}\ncpp:std::vector<url_view_base::segments>::iterator[]\n```\n\nThis will render as a link to the\n`std::vector<url_view_base::segments>::iterator` class in the\ncppreference tagfile.\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/container/vector[std::vector,window=\"_blank\"]&#x3C;xref:reference:boost/urls/url_view_base/segments.adoc[url_view_base::segments]&#x3E;::https://en.cppreference.com/w/cpp/container/vector[std::vector::iterator,window=\"_blank\"]\n`\n```\n\nReplacing target names {#_replacing_target_names}\n----------------------\n\nThe extension can replace the target names of the links.\n\n``` {.asciidoc}\ncpp:std::vector[sequential container]\n```\n\nThis will render as a link to the `std::vector` class in the\ncppreference tagfile with the text \\\"sequential container\\\".\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/container/vector[sequential container,window=\"_blank\"]`\n```\n\nWhich renders as\n`https://en.cppreference.com/w/cpp/container/vector[sequential container,window=\"_blank\"]`.\n\nWhen providing custom text for a template class, the extension will only\nlink the main symbol:\n\n``` {.asciidoc}\ncpp:std::vector<int>[sequential container]\n```\n\nThis will render as a link to the `std::vector` class in the\ncppreference tagfile with the text \\\"sequential container\\\".\n\n``` {.asciidoc}\n`https://en.cppreference.com/w/cpp/container/vector[sequential container,window=\"_blank\"]`\n```\n\nWhich also renders as\n`https://en.cppreference.com/w/cpp/container/vector[sequential container,window=\"_blank\"]`.\n\n``` {.asciidoc}\ncpp:url_view_base::segments[URL segments]\n```\n\nThis will render as a link to the `boost::urls::url_view_base::segments`\nclass in the `boost-url-doxygen.tag.xml` tagfile with the text \\\"URL\nsegments\\\".\n\n``` {.asciidoc}\n`xref:reference:boost/urls/url_view_base/segments.adoc[URL segments]`\n```\n","readmeFilename":"README.md"}