[
https://issues.apache.org/jira/browse/TIKA-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18084160#comment-18084160
]
ASF GitHub Bot commented on TIKA-4743:
--------------------------------------
Copilot commented on code in PR #2845:
URL: https://github.com/apache/tika/pull/2845#discussion_r3319659877
##########
docs/publish-docs.sh:
##########
@@ -40,12 +40,16 @@ mkdir -p "${DOCS_DIR}"
# Strip the 'tika/' component dir prefix so URLs are /docs/X.Y.Z/...
cp -r target/site/tika/* "${DOCS_DIR}/"
-# UI assets one level above docs/, since HTML uses ../../_/ relative paths
-cp -r target/site/_/ "${PUBLISH_DIR}/_/"
+# UI assets one level above docs/, since HTML uses ../../_/ relative paths.
+# Replace wholesale: cp -r into an existing directory nests source as a
+# subdirectory (publish/_/_/), so remove first to keep the layout flat.
+rm -rf "${PUBLISH_DIR}/_"
+cp -r target/site/_ "${PUBLISH_DIR}/_"
Review Comment:
`rm -rf "${PUBLISH_DIR}/_"` makes the script more dangerous if `PUBLISH_DIR`
is accidentally set incorrectly (e.g., `/` or an unexpected checkout). Consider
adding a safety check (e.g., verify `PUBLISH_DIR` exists and looks like a
tika-site `publish/` dir) before removing, or refuse to run when `PUBLISH_DIR`
is too short / equals `/`.
##########
docs/supplemental-ui/partials/header-content.hbs:
##########
@@ -5,22 +5,21 @@
<img src="{{{uiRootPath}}}/img/ASF_Tika-colour.svg" alt="Apache Tika"
style="height: 2rem; margin-right: 0.5rem; background: white; padding: 2px 4px;
border-radius: 3px;">
{{site.title}}
</a>
- <button class="navbar-burger" aria-label="Toggle navigation"
data-target="topbar-nav">
+ {{#if env.SITE_SEARCH_PROVIDER}}
+ <div class="navbar-item search hide-for-print">
+ <div id="search-field" class="field">
+ <input id="search-input" type="text" placeholder="Search the
docs"{{#if page.home}} autofocus{{/if}}>
Review Comment:
The new search input is missing an accessible label. Placeholders aren’t a
substitute for labels, so screen readers may announce this as an unlabeled edit
field. Consider adding an associated <label> (visually hidden if needed) and/or
an `aria-label` (and optionally `type="search"` / `role="search"`).
> tika-4.0.0-alpha1 - documentation site
> --------------------------------------
>
> Key: TIKA-4743
> URL: https://issues.apache.org/jira/browse/TIKA-4743
> Project: Tika
> Issue Type: Bug
> Affects Versions: 4.0.0
> Reporter: Adrian Bird
> Priority: Minor
>
> A couple of comments about the [Apache Tika Documentation
> site|https://tika.apache.org/docs/4.0.0-SNAPSHOT/index.html].
> * I was expecting the menu items on the left to open and show lower level
> pages where they have a triangle, but they don't. This does make it tricky to
> navigate because you have to do it via the links on the pages themselves.
> * Search - trying to use the search feature pops up a small box with the
> text 'Loading search index...' (in white on the light gray background means
> it isn't really visible) and nothing happens i.e. no search results are
> displayed.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)