diff --git a/docs/make.jl b/docs/make.jl index 104273ab5a4..8731ab4bc36 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -2,8 +2,7 @@ using PlotDocs, PlotThemes, Plots, RecipesBase, RecipesPipeline using Documenter, DemoCards, Literate import StatsPlots -# monkey patch `Documenter` for duplicate gallery search results - see github.com/JuliaPlots/Plots.jl/issues/4157 -# note that this could break on minor `Documenter` releases +# monkey patch `Documenter` - note that this could break on minor `Documenter` releases @eval Documenter.Writers.HTMLWriter domify(ctx, navnode) = begin # github.com/JuliaDocs/Documenter.jl/blob/327d155f992ec7c63e35fa2cb08f7f7c2d33409a/src/Writers/HTMLWriter.jl#L1448-L1455 page = getpage(ctx, navnode) @@ -12,12 +11,12 @@ import StatsPlots ############################################################ # begin addition add_to_index = if (m = match(r"gallery/(\w+)/", lowercase(rec.src))) !== nothing - first(m.captures) == "gr" # only add `GR` gallery pages to `search_index` + first(m.captures) == "gr" # only add `GR` gallery pages to `search_index` (github.com/JuliaPlots/Plots.jl/issues/4157) else true end if (m = match(r"generated/attributes_(\w+).html", lowercase(rec.src))) !== nothing - # fix attributes search terms (:Series, :Plot, :Subplot, :Axis) + # fix attributes search terms: `Series`, `Plot`, `Subplot` and `Axis` (github.com/JuliaPlots/Plots.jl/issues/2337) rec = SearchRecord( rec.src, rec.page, rec.fragment, rec.category, rec.title, rec.page_title, $(ATTRIBUTE_SEARCH)[first(m.captures)] diff --git a/src/PlotDocs.jl b/src/PlotDocs.jl index e01f5e764ad..715dc7eeb55 100644 --- a/src/PlotDocs.jl +++ b/src/PlotDocs.jl @@ -258,7 +258,7 @@ function generate_attr_markdown(c) md = open(joinpath(GENDIR, "attributes_$cstr.md"), "w") df = make_attr_df(c, ATTRIBUTE_DEFAULTS[c]) - ATTRIBUTE_SEARCH[cstr] = attr_text * ' ' * join(df.Attribute, ' ') + ATTRIBUTE_SEARCH[cstr] = attr_text * ' ' * join(df.Attribute, ' ') * join(df.Aliases, ' ') write(md, """ ```@meta