๐Ÿ“ฆ AlexWaygood / typeshed-stats

๐Ÿ“„ mkdocs.yml ยท 91 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91site_name: typeshed-stats
site_url: https://alexwaygood.github.io/
site_author: "Alex Waygood"
site_description: "A website providing statistics and analysis of typeshed's stubs packages"
docs_dir: "stats_website"
repo_url: https://github.com/AlexWaygood/typeshed-stats
repo_name: AlexWaygood/typeshed-stats

theme:
  name: material
  logo: logo.png
  favicon: logo.png
  icon:
    repo: fontawesome/brands/github
  features:
    - navigation.tabs
    - navigation.tabs.sticky
  palette:
    # Palette toggle for light mode
    - media: "(prefers-color-scheme: light)"
      primary: blue grey
      scheme: default
      toggle:
        icon: material/weather-sunny
        name: Switch to dark mode

    # Palette toggle for dark mode
    - media: "(prefers-color-scheme: dark)"
      primary: black
      accent: yellow
      scheme: slate
      toggle:
        icon: material/weather-night
        name: Switch to light mode

plugins:
  - search
  - macros: # Enables using jinja capabilities in MarkDown
      module_name: website_macros
      on_error_fail: true
  - mkdocstrings:
      enable_inventory: true # This means other projects can reference parts of our API
      handlers:
        python:
          inventories:
            # These mean references to Python builtins and aiohttp are autolinked in docstrings etc.
            - https://docs.python.org/3/objects.inv
            - https://docs.aiohttp.org/en/stable/objects.inv
          options:
            show_source: false
            show_bases: false
            show_root_full_path: false
            merge_init_into_class: true
            show_root_toc_entry: false

nav:
  - "Welcome to typeshed-stats": "index.md"
  - "Stats on typeshed's stubs": "stats.md"
  - "Stats in CSV format": "stats-csv.md"
  - "typeshed_stats.gather API reference": "gather.md"
  - "typeshed_stats.serialize API reference": "serialize.md"
  - "CLI reference": "cli.md"

markdown_extensions:
  - tables
  # This extension enables us to keep our links in a separate file
  # https://facelessuser.github.io/pymdown-extensions/extensions/snippets/
  - pymdownx.snippets:
      base_path:
        - stats_website/.snippets
      auto_append:
        - refs.md
      check_paths: true
  # This extension allows expandable "details" sections
  # https://facelessuser.github.io/pymdown-extensions/extensions/details/
  - pymdownx.details
  # This extension allows using rST-style admonitions in MarkDown
  # https://python-markdown.github.io/extensions/admonition/
  - admonition

watch:
  - stats_website
  - src

extra_javascript:
  # These all mean that the table-rendering of the stats in stats-csv.md can be sorted
  - https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js
  - https://unpkg.com/tablesort@5.3.0/dist/sorts/tablesort.number.min.js
  - javascripts/tablesort.js
  - javascripts/filtertable.js