Skip to content

Commit

Permalink
Merge branch 'main' into hd-i18n-fr-refactor-sidebar-nav-guide-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo authored Apr 15, 2024
2 parents 7e62bd6 + 23ce639 commit 228bcab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/src/content/docs/fr/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ starlight({
});
```

Les entrées dans `head` sont converties directement en éléments HTML et ne passent pas par le traitement de [script](https://docs.astro.build/fr/guides/client-side-scripts/#regroupement-de-script) ou de [style](https://docs.astro.build/fr/guides/styling/#styliser-avec-astro) d'Astro.
Si vous avez besoin d'importer des ressources locales comme des scripts, des styles ou des images, [redéfinissez le composant Head](/fr/guides/overriding-components/#réutiliser-un-composant-intégré).

#### `HeadConfig`

```ts
Expand Down
4 changes: 2 additions & 2 deletions packages/starlight/__tests__/basics/git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ describe('getNewestCommitDate', () => {

test('throws when failing to retrieve the git history for a file', () => {
expect(() => getNewestCommitDate(getFilePath('../not-a-starlight-test-repo/test.md'))).toThrow(
/^Failed to retrieve the git history for file "[/\\-\w ]+\/test\.md"/
/^Failed to retrieve the git history for file "[/\\:-\w ]+[/\\]test\.md"/
);
});

test('throws when trying to get the history of a non-existing or untracked file', () => {
const expectedError =
/^Failed to validate the timestamp for file "[/\\-\w ]+\/(?:unknown|untracked)\.md"$/;
/^Failed to validate the timestamp for file "[/\\:-\w ]+[/\\](?:unknown|untracked)\.md"$/;
writeFile('untracked.md', 'content');

expect(() => getNewestCommitDate(getFilePath('unknown.md'))).toThrow(expectedError);
Expand Down
4 changes: 2 additions & 2 deletions packages/starlight/__tests__/i18n-root-locale/routing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ test('fallback routes use fallback entry last updated dates', () => {

expect(getNewestCommitDate).toHaveBeenCalledOnce();
expect(getNewestCommitDate.mock.lastCall?.[0]).toMatch(
/src\/content\/docs\/guides\/authoring-content.md$/
// ^ no `en/` prefix
/src[/\\]content[/\\]docs[/\\]guides[/\\]authoring-content.md$/
// ^ no `en/` prefix
);

getNewestCommitDate.mockRestore();
Expand Down

0 comments on commit 228bcab

Please sign in to comment.