Skip to content

Commit

Permalink
Fix incorrectly implemented PR #4243
Browse files Browse the repository at this point in the history
I messed up implenting Don't include "home file" in documentation search.
The front matter wasn't the first thing in the file where I added it.
  • Loading branch information
SeanTAllen committed Dec 15, 2022
1 parent 45cf9d0 commit 126aea3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .release-notes/fix-4243.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Fix "Don't include 'home file' in documentation search"

[PR #4243](https://github.com/ponylang/ponyc/pull/4243) incorrectly implemented the "don't include 'home file' in documentation search". It has been fixed.

The original release notes are now accurate (before it wasn't working!):

We've updated the documentation generation to not include the "home file" that lists the packages in the search index. The "exclude from search engine" functionality is only available in the `mkdocs-material-insiders` theme.

The home file is extra noise in the index that provides no value. For anyone using the insiders theme, this will be an improvement in the search experience.
2 changes: 1 addition & 1 deletion src/libponyc/pass/docgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,12 +1374,12 @@ void generate_docs(ast_t* program, pass_opt_t* options)
ast_t* package = ast_child(program);
const char* name = package_filename(package);

fprintf(docgen.home_file, "Packages\n\n");
// tell the mkdocs theme not index the home file for search
fprintf(docgen.home_file, "---\n");
fprintf(docgen.home_file, "search:\n");
fprintf(docgen.home_file, " exclude: true\n");
fprintf(docgen.home_file, "---\n");
fprintf(docgen.home_file, "Packages\n\n");

fprintf(docgen.index_file, "site_name: %s\n", name);
fprintf(docgen.index_file, "theme:\n");
Expand Down

0 comments on commit 126aea3

Please sign in to comment.