From 3813004537f05133fc4bff09eefdf11723848ddf Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Sun, 26 Mar 2023 18:46:35 -0700 Subject: offline search in user guide and optional stats tracking for online docs --- api-docs/source/conf.py | 12 ++++++++++++ mkdocs.yml | 6 ++++-- overrides/partials/integrations/custom.html | 3 +++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 overrides/partials/integrations/custom.html diff --git a/api-docs/source/conf.py b/api-docs/source/conf.py index 642cfce4..d511b85e 100644 --- a/api-docs/source/conf.py +++ b/api-docs/source/conf.py @@ -23,6 +23,16 @@ import platform import inspect import glob +stats = ''' + +.. raw:: html + + + +''' + if (platform.system() == "Darwin"): bnpath=os.path.join(os.path.abspath('.'), "..", "..", "..", "build", "out", "binaryninja.app", "Contents", "Resources", "python") else: @@ -132,8 +142,10 @@ Full Class List :members: :undoc-members: :show-inheritance:''') + modulefile.write(stats) modulefile.close() + pythonrst.write(stats) pythonrst.close() diff --git a/mkdocs.yml b/mkdocs.yml index 479d6bcc..4ef0662c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,13 +4,14 @@ repo_url: 'https://binary.ninja/' repo_name: 'binary.ninja' site_description: 'Documentation for the Binary Ninja reverse engineering platform' site_author: 'Vector 35 Inc' -google_analytics: ['UA-72420552-3', 'docs.binary.ninja' ] -use_directory_urls: False +use_directory_urls: false extra_css: ['docs.css', 'github.min.css', 'juxtapose.min.css'] extra_javascript: ['highlight.min.js', 'cpp.min.js', 'python.min.js', 'juxtapose.min.js'] theme: name: material + custom_dir: overrides favicon: 'img/favicon.ico' + font: false highlightjs: false palette: scheme: binja @@ -33,6 +34,7 @@ theme: plugins: - search + - offline markdown_extensions: - codehilite diff --git a/overrides/partials/integrations/custom.html b/overrides/partials/integrations/custom.html new file mode 100644 index 00000000..50e849e6 --- /dev/null +++ b/overrides/partials/integrations/custom.html @@ -0,0 +1,3 @@ + -- cgit v1.3.1