Merge pull request #5420 from roc-lang/docs-index-html

fixed docs index.html overwrite
This commit is contained in:
Anton-4 2023-05-17 20:37:20 +02:00 committed by GitHub
commit b43b12a939
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 9 deletions

View file

@ -135,7 +135,7 @@ pub fn generate_docs_html(root_file: PathBuf) {
// TODO fix: as is, this overrides an existing index.html
// Write index.html for package (/index.html)
/*{
{
let rendered_package = template_html
.replace(
"<!-- Page title -->",
@ -156,7 +156,7 @@ pub fn generate_docs_html(root_file: PathBuf) {
error
)
});
}*/
}
// Write each package module's index.html file
for module_docs in loaded_module.docs_by_module.values() {
@ -196,8 +196,7 @@ fn page_title(package_name: &str, module_name: &str) -> String {
format!("<title>{module_name} - {package_name}</title>")
}
// TODO re-enable with let rendered_package = template_html...
/*fn render_package_index(root_module: &LoadedModule) -> String {
fn render_package_index(root_module: &LoadedModule) -> String {
// The list items containing module links
let mut module_list_buf = String::new();
@ -228,7 +227,7 @@ fn page_title(package_name: &str, module_name: &str) -> String {
);
index_buf
}*/
}
fn render_module_documentation(
module: &ModuleDocumentation,

View file

@ -42,7 +42,7 @@
</main>
<footer>
<p>Made by people who like to make nice things.</p>
<p>© 2021</p>
<p>© 2023</p>
</footer>
</body>