-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(documentation): add base search url #2799
Conversation
Branch Preview |
Tachometer resultsCurrently, no packages are changed by this PR... |
@@ -72,7 +74,7 @@ export async function search(value: string): Promise<ResultGroup[]> { | |||
catagoryData.results.push({ | |||
name, | |||
label: label(name), | |||
url: item.ref, | |||
url: BASE_URL + item.ref, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This work was previously being managed here and here. I'd definitely like to continue to process this at index build time, rather than site build time. This would likely involve a deeper understanding of how we leveraging our scripting in association with wireit to build and run the docs site. Something along the lines of breaking "build:search-index"
out of the "build:assets"
script and running a context specific version in each of "build"
/"serve"
, which will likely be the same for the two contexts, and "build:production"
, which would need a value set for process.eng.SWC_DIR
or possibly update the underlying script to accept a flag in the CLI instead...
@@ -13,8 +13,6 @@ governing permissions and limitations under the License. | |||
import { build } from 'esbuild'; | |||
import { litCssPlugin } from 'esbuild-plugin-lit-css'; | |||
import postcss from 'postcss'; | |||
// import { postCSSPlugins } from '../../../scripts/css-processing.cjs'; | |||
import purgecss from '@fullhuman/postcss-purgecss'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed unused import
@@ -192,7 +192,7 @@ body { | |||
width: 36px; | |||
height: 31px; | |||
display: block; | |||
margin-right: var(--spectrum-global-dimension-size-200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used logical operators for RTL margins of the sidenav header
@@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag | |||
governing permissions and limitations under the License. | |||
*/ | |||
|
|||
import postHTMLSpectrumTypeography from './posthtml-spectrum-typography.js'; | |||
export { postHTMLSpectrumTypeography }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for working through this. Really points out that we need a more reliable testing context for the code that actually makes it out to the live site for this, or we need to work on getting that context more like the review context. I've some ideas that I hopefully have some time for during the holiday lull this week and after the New Year.
db7dd89
to
777e123
Compare
Description
Currently clicking on search results in production will lead you to 404 due to the fact that the base-url or SWC_DIR is not correctly set on production environments.
Carve out the build:search-index step from build:assets to conditionally apply build:search-index or build:search-index:prod based off the environment.
Related issue(s)
Motivation and context
How has this been tested?
yarn docs:production
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.