Skip to content

Conversation

evankanderson
Copy link
Member

@evankanderson evankanderson commented Sep 17, 2025

This is gross, but should fix site search temporarily, while I negotiate a better fix upstream in the built mkdocs TypeScript bundle.

Proposed Changes

This fixes search, and also fixes the version-picking nav (which will try to go to the equivalent page in the target version, if it exists, and otherwise navigate to the docs root, e.g. http://knative.dev/development/reference/security/verifying-images/ ==> http://knative.dev/v1.18-docs/reference/security/verifying-images/)

Note that (for the first time) search works across both the blog and the technical documentation -- previously, they were separate builds, so you wouldn't find blog posts searching the main documentation, and you wouldn't find documentation pages when searching from the blog.

Copy link

netlify bot commented Sep 17, 2025

Deploy Preview for knative ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f77e8a6
🔍 Latest deploy log https://app.netlify.com/projects/knative/deploys/68ccd2b2c8ec110009362a62
😎 Deploy Preview https://deploy-preview-6392--knative.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 17, 2025
@evankanderson
Copy link
Member Author

This is not working correctly. Let me try a worse approach.

@evankanderson
Copy link
Member Author

It turns out search uses config.base for the output URLs. My next attempt will be to fix the version-picker logic, which seems slightly simpler (though inside the minified JS bundle currently).

@dprotaso
Copy link
Member

Should search work in the preview?

@evankanderson
Copy link
Member Author

Not yet, I broke a second thing and it turns out the fix is more complex

@dprotaso
Copy link
Member

Not yet, I broke a second thing and it turns out the fix is more complex

Do you want to merge this now and then provide a follow up?

@evankanderson evankanderson force-pushed the fix-search branch 2 times, most recently from 8a2d28e to 170b3b6 Compare September 18, 2025 22:23
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 18, 2025
@evankanderson evankanderson force-pushed the fix-search branch 2 times, most recently from 96a811e to 05c2529 Compare September 18, 2025 22:42
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 18, 2025
@evankanderson
Copy link
Member Author

I believe this is now ready for review.

@evankanderson
Copy link
Member Author

Hmm, the cross-version nav worked locally, but not on the site. This still fixes search, so I think it's an improvement, but I'll need to see what's going on with cross-version navigation later.

@evankanderson
Copy link
Member Author

Hmm, the cross-version nav worked locally, but not on the site. This still fixes search, so I think it's an improvement, but I'll need to see what's going on with cross-version navigation later.

The cross-version deep-linked navigation seems to be being defeated by a change to the sitemap.xml when built by netlify. Comparing built locally vs netlify:

$ grep -o '/v1.17-docs/\?<' netlify-sitemap.xml site/sitemap.xml
netlify-sitemap.xml:/v1.17-docs<
site/sitemap.xml:/v1.17-docs/<

Hopefully, this can be fixed upstream via PR shortly.
@evankanderson evankanderson changed the title Temporarily fix site search Fix site search Sep 19, 2025
@evankanderson
Copy link
Member Author

It turns out we're using the netlify sitemap plugin (probably a holdover from Hugo days). I reconfigured it to include the trailing slash until I can get into the console to disable it.

@evankanderson
Copy link
Member Author

Okay, this is ready for review; search and between-version nav are both working correctly, AFAICT.

@dprotaso
Copy link
Member

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 19, 2025
Copy link

knative-prow bot commented Sep 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, evankanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [dprotaso,evankanderson]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit 2896a02 into knative:main Sep 19, 2025
19 checks passed
@dprotaso
Copy link
Member

as a follow up is there a way to build mkdocs-material and patch it - in case we need to make further edits?

or alternatively fork the project given your upstream contribution is paused?

evankanderson added a commit to evankanderson/docs that referenced this pull request Sep 19, 2025
Hopefully, this can be fixed upstream via PR shortly.
@evankanderson
Copy link
Member Author

as a follow up is there a way to build mkdocs-material and patch it - in case we need to make further edits?

or alternatively fork the project given your upstream contribution is paused?

My pull request is in a fork -- I was able to clone the fork using GitHub Codespaces in order to produce a bundle with the same checksum, so I think we can probably reproduce it (though we can certainly produce more forks of my fork if we want).

evankanderson added a commit to evankanderson/docs that referenced this pull request Sep 25, 2025
Hopefully, this can be fixed upstream via PR shortly.
knative-prow bot pushed a commit that referenced this pull request Sep 25, 2025
* Phase 1: Adding documentation metadata tags (#6274)

* Add metadata tags for documentation

* Add classification for about 2/3rds of docs (func + eventing)

* Add classification for remainder of docs (serving+install)

* Add mermaid support (#6327)

* Publish threat model in documentation (#6263)

* Publish threat model in documentation

* Separate security contents a bit more, update link to threat model, update nav

* Add a section on supply chain and SBOM/SLSA mitigation

* Update threat model with feedback from David Hadas

* Update introduction with content from davidhadas, add sections on controller and webhook functionality and update targets of threats

* content tab fixes, added success output for kn func (#6367)

* Add dry run section and take out old feature flag in serving (#6366)

* add dry run section

* drop mention of old feature flag

* fix casing on nav

* update docs to be more clear and include inline example

---------

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>

* Attempt to rebuild docs build process, inspired by #6319 (#6371)

* Attempt to rebuild docs build process

* Use a more modern python version

* Fix strict verify, hide versions on unversioned pages

* Fix search with mkdocs typescript patches (vendored). (#6392)

Hopefully, this can be fixed upstream via PR shortly.

* Installation Doc Updates (#6395)

* Installation Doc Updates

Improve installation guidance

* Formatting fix

* Update docs/install/README.md

link fix

Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>

* Update docs/install/README.md

link fix

Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>

* link fix and table update

More writing

* Update README.md

Misc edits

* Update README.md

Minor edits

* Adding install-kn to PR

Consolidating CLI installations into this this topic.

* Update install-kn.md

Changing red bug alert to important
The old syntax was:
??? bug "Having issues upgrading `kn` to Homebrew?"

* Update install-kn (snippet)

Removed alert formatting

* Added quickstart-install.md

Various edits

* Fixes and reviewed edits

Made Evan suggestions, table column test, spelling fixes

* Update quickstart-install.md

link fix

* Update README.md

Replaced the table with a bulleted list approach.

* Update README.md

Put back the table

* Added serving and eventing install topics

Updated topics per effort - consolidating guidance

* Link fixes

* Made Evan's edits

* Various updates

All files added for this PR.

* Link fix

* Formatting fixes

* Formatting and consistency fix

* Update docs/install/operator/knative-with-operator-cli.md

Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>

* Update docs/client/install-kn.md

Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>

---------

Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>

* Fix edit page links, move technical docs under sub-heading (#6398)

* Fix edit links by moving docs content under a dedicated subdirectory

* Fix edit links by moving docs content under a dedicated subdirectory

* Add High availability documentation section for eventing (#6401)

I have copy-pasted from the Knative Serving documentation page the block as I found it missing when configuring it.

* Update proc-running-function.md (#6400)

Undo separeate kn func output for invoke

* Add a note that Apache Kafka is required to use EKB (#6404)

* Move install docs to administration (#6403)

* Fix trailing newline complaints

* Fix redirects from #6398

---------

Co-authored-by: Bruce Hamilton <scarlettbernique@gmail.com>
Co-authored-by: Alexander-Kita <Alexander.Kita@ibm.com>
Co-authored-by: Dave Protasowski <dprotaso@gmail.com>
Co-authored-by: Aurélien Joga <aurelienjoga+ajoga@gmail.com>
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants