Skip to content

Commit

Permalink
Update to latest Kit and handle breaking changes (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrich authored Jan 21, 2022
1 parent 99870b7 commit 95d4753
Show file tree
Hide file tree
Showing 20 changed files with 129 additions and 206 deletions.
2 changes: 1 addition & 1 deletion packages/site-kit/src/lib/components/NavItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{:else}
<li>
<a
aria-current={$page.path.startsWith(href) ? true : undefined}
aria-current={$page.url.pathname.startsWith(href) ? true : undefined}
sveltekit:prefetch
{href}
{title}
Expand Down
6 changes: 3 additions & 3 deletions packages/site-kit/src/lib/docs/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if (heading.nodeName.startsWith('H') && !heading.querySelector('a')) {
const a = document.createElement('a');
a.className = 'anchor';
a.href = `${$page.path}#${heading.id}`;
a.href = `${$page.url.pathname}#${heading.id}`;
const span = document.createElement('span');
span.className = "visually-hidden";
span.innerHTML = "permalink";
Expand Down Expand Up @@ -45,15 +45,15 @@
const { id } = heading;
if (id !== last_id) {
path = `${$page.path}#${id}`;
path = `${$page.url.pathname}#${id}`;
last_id = id;
}
return;
}
}
path = $page.path;
path = $page.url.pathname;
};
window.addEventListener('scroll', onscroll, true);
Expand Down
Loading

2 comments on commit 95d4753

@vercel
Copy link

@vercel vercel bot commented on 95d4753 Jan 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hn – ./sites/hn.svelte.dev

hn.svelte.dev
sites-zeta.vercel.app
hn-svelte.vercel.app
hn-git-master-svelte.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 95d4753 Jan 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svelte-dev – ./sites/svelte.dev

svelte-dev-git-master-svelte.vercel.app
svelte-website.vercel.app
svelte-dev-svelte.vercel.app
svelte.dev

Please sign in to comment.