Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cloudhal-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
- name: Merge a patch release
if: steps.meta.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge "$PR" --merge --repo "$GITHUB_REPOSITORY"
run: gh pr merge "$PR" --auto --merge --repo "$GITHUB_REPOSITORY"
env:
PR: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/EntryList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const cover = (e: ContentEntry) => {
<img class="ch-card-entry__cover" src={img.src} srcset={img.srcset} sizes={img.sizes} alt="" width={img.width || undefined} height={img.height || undefined} loading="lazy" decoding="async" />
)}
<div class="ch-card-entry__body">
<a href={entryPath(e)}>{e.title}</a>
<a href={entryPath(media?.permalinks, e)}>{e.title}</a>
{e.summary && <p>{e.summary}</p>}
<span class="ch-card-entry__meta">
{e.publishedAt && <time datetime={e.publishedAt}>{date(e.publishedAt)}</time>}
Expand Down
8 changes: 6 additions & 2 deletions src/pages/[...path].astro
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { themeVariables } from "@cloudhal/astro-renderer/theme-settings";
import type { ContentEntry } from "@cloudhal/core-contracts";
/**
* One route for the whole graph (RFC-0002 §7 order): a Page answers at its `path`; an article at
* `/<collection>/<slug>`; a category or tag archive at `<basePath>/<slug>[/page/<n>]`. Anything
* its collection's permalink (`/<collection>/<slug>` by default, RFC-0038); a category or tag archive at `<basePath>/<slug>[/page/<n>]`. Anything
* else asks the site's redirects (301 with the query kept), then answers 410 for a retired term
* or 404. Term feeds live next door in `[...path]/rss.xml.ts`. The header renders the `primary`
* menu, or the derived header without one; a `footer` menu replaces the footer links (RFC-0003).
Expand Down Expand Up @@ -161,7 +161,9 @@ const isMenu = route.kind === "not-found" && path === "/menu";
// Reader comments (RFC-0007): tags the response `cloudhal-comments-<id>` and reads the thread;
// `?comments=<n>` past the last page is a miss.
const comments =
route.kind === "entry" ? await loadComments(config, Astro, route.entry, { locale }) : undefined;
route.kind === "entry"
? await loadComments(config, Astro, route.entry, { locale, site })
: undefined;
// A miss (RFC-0033 §4) answers 404 in the request's locale: the site's page at `/404` (its
// translation, or the original under `default-with-notice`), else the theme's NotFound below.
// The authored page answers 404 at its own path too.
Expand Down Expand Up @@ -199,6 +201,8 @@ const media: MediaContext = {
icons: { weight: String(site.theme.config?.iconWeight ?? "regular"), set: iconSet },
// RFC-0028: one placeholder allowance for the whole page.
budget: placeholderBudget(),
// RFC-0038: entry links follow the site's collection permalinks.
permalinks: site,
};
const t = strings(locale, site.theme.config?.strings);
const index = route.kind === "archive" ? route.index : await loadTaxonomyIndex(source, locale);
Expand Down
Loading