fr-docs 2.1.0__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fr_docs-2.1.0 → fr_docs-2.1.1}/PKG-INFO +1 -1
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/html_pipeline.py +13 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/template.py +5 -1
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs.egg-info/PKG-INFO +1 -1
- {fr_docs-2.1.0 → fr_docs-2.1.1}/pyproject.toml +1 -1
- {fr_docs-2.1.0 → fr_docs-2.1.1}/LICENSE.md +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/README.md +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/__init__.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/__main__.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/build.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/config.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/config_accessors.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/frontmatter.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/git.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/init.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/markdown.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/search.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/slug.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/syntax.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs/utils.py +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs.egg-info/SOURCES.txt +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs.egg-info/dependency_links.txt +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs.egg-info/entry_points.txt +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs.egg-info/requires.txt +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/fr_docs.egg-info/top_level.txt +0 -0
- {fr_docs-2.1.0 → fr_docs-2.1.1}/setup.cfg +0 -0
|
@@ -81,6 +81,18 @@ def _render_template_placeholders(config):
|
|
|
81
81
|
<input type="text" id="header-search" placeholder="Search docs… (Ctrl+K)" autocomplete="off">
|
|
82
82
|
<div id="search-results" class="search-results"></div>"""
|
|
83
83
|
|
|
84
|
+
def _get_search_preloads_html():
|
|
85
|
+
if not feature_enabled(config, "search"):
|
|
86
|
+
return ""
|
|
87
|
+
sp = output_href("", config)
|
|
88
|
+
return (
|
|
89
|
+
f'<link rel="preload" as="fetch" href="{sp}search_index.zst" crossorigin>\n'
|
|
90
|
+
f' <link rel="preload" as="fetch" href="{sp}symbol_index.zst" crossorigin>\n'
|
|
91
|
+
f' <link rel="preload" as="fetch" href="{sp}file_index.zst" crossorigin>\n'
|
|
92
|
+
f' <link rel="preload" as="fetch" href="{sp}git_meta.zst" crossorigin>\n'
|
|
93
|
+
f' <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/fzstd@0.1.1/umd/index.min.js">'
|
|
94
|
+
)
|
|
95
|
+
|
|
84
96
|
return {
|
|
85
97
|
"site_prefix": output_href("", config),
|
|
86
98
|
"page_title": "",
|
|
@@ -95,6 +107,7 @@ def _render_template_placeholders(config):
|
|
|
95
107
|
"subtitle_html": "",
|
|
96
108
|
"body": "",
|
|
97
109
|
"search_index_inline": "",
|
|
110
|
+
"search_preloads": _get_search_preloads_html(),
|
|
98
111
|
"copyright_year": _get_copyright_year(),
|
|
99
112
|
"copyright_holder": _get_copyright_holder(),
|
|
100
113
|
}
|
|
@@ -17,11 +17,14 @@ TEMPLATE = """\
|
|
|
17
17
|
<meta property="og:site_name" content="{project_name} Docs">
|
|
18
18
|
<meta name="theme-color" content="#6366f1">
|
|
19
19
|
<meta name="color-scheme" content="dark">
|
|
20
|
+
<link rel="stylesheet" href="{site_prefix}style.css">
|
|
20
21
|
<link rel="icon" href="{site_prefix}favicon.svg" type="image/svg+xml">
|
|
21
22
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
22
23
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
23
24
|
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400..800&family=JetBrains+Mono:wght@400..700&display=swap" rel="stylesheet">
|
|
24
|
-
<link rel="
|
|
25
|
+
<link rel="preload" as="font" href="https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmM.woff2" type="font/woff2" crossorigin>
|
|
26
|
+
<link rel="preload" as="font" href="https://fonts.gstatic.com/s/inter/v20/UcCo3FwrK3iLTcviYwYZ8UA3.woff2" type="font/woff2" crossorigin>
|
|
27
|
+
<link rel="preload" as="font" href="https://fonts.gstatic.com/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0P.woff2" type="font/woff2" crossorigin>
|
|
25
28
|
</head>
|
|
26
29
|
<body>
|
|
27
30
|
<!-- Header -->
|
|
@@ -72,6 +75,7 @@ TEMPLATE = """\
|
|
|
72
75
|
</button>
|
|
73
76
|
|
|
74
77
|
{search_index_inline}
|
|
78
|
+
{search_preloads}
|
|
75
79
|
<script id="code-refs-data" type="application/json">{code_refs_json}</script>
|
|
76
80
|
<script id="search-config" type="application/json">{search_config_json}</script>
|
|
77
81
|
<script src="{site_prefix}script.js" defer></script>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|