@quartz-community/tag-page 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 9c6c593: Bundles `@quartz-community/utils` 1.1.0: a short wikilink to an Obsidian folder note (`[[Topic]]` for `Topic/Topic.md`) reaches the folder page, and anchors to headings use the same slug as heading ids. `github-slugger` is no longer a dependency of this plugin.
8
+
3
9
  ## 1.0.1
4
10
 
5
11
  ### Patch Changes
@@ -287,8 +287,6 @@ function byDateAndAlphabetical() {
287
287
  return f1Title.localeCompare(f2Title);
288
288
  };
289
289
  }
290
-
291
- // node_modules/@quartz-community/utils/dist/path.js
292
290
  function simplifySlug(fp) {
293
291
  const res = stripSlashes(trimSuffix(fp, "index"), true);
294
292
  return res.length === 0 ? "/" : res;
@@ -2832,12 +2830,12 @@ var TagContent_default = ((opts) => {
2832
2830
  const TagContent = (props) => {
2833
2831
  const { tree, fileData, allFiles, cfg } = props;
2834
2832
  const fd = fileData;
2835
- const slug2 = fd.slug;
2833
+ const slug = fd.slug;
2836
2834
  const locale = cfg?.locale ?? "en-US";
2837
- if (!(slug2?.startsWith("tags/") || slug2 === "tags")) {
2838
- throw new Error(`Component "TagContent" tried to render a non-tag page: ${slug2}`);
2835
+ if (!(slug?.startsWith("tags/") || slug === "tags")) {
2836
+ throw new Error(`Component "TagContent" tried to render a non-tag page: ${slug}`);
2839
2837
  }
2840
- let tag = simplifySlug(slug2.slice("tags/".length));
2838
+ let tag = simplifySlug(slug.slice("tags/".length));
2841
2839
  if (tag !== "/" && tag.endsWith("/")) tag = tag.slice(0, -1);
2842
2840
  const allPagesWithTag = (t2) => allFiles.filter(isListed).filter(
2843
2841
  (file) => (file.frontmatter?.tags ?? []).flatMap(getAllSegmentPrefixes).includes(t2)
@@ -2876,7 +2874,7 @@ var TagContent_default = ((opts) => {
2876
2874
  const root2 = contentPage?.filePath ? contentPage?.htmlAst : void 0;
2877
2875
  const tagDesc = !root2 || root2.children.length === 0 ? contentPage?.description : htmlToJsx(root2);
2878
2876
  const tagListingPage = contentPage?.slug ?? tagPageSlug(t2, tags);
2879
- const href = resolveRelative(slug2, tagListingPage);
2877
+ const href = resolveRelative(slug, tagListingPage);
2880
2878
  return /* @__PURE__ */ u2("div", { children: [
2881
2879
  /* @__PURE__ */ u2("h2", { children: /* @__PURE__ */ u2("a", { class: "internal tag-link", href, children: t2 }) }),
2882
2880
  tagDesc && /* @__PURE__ */ u2("p", { children: tagDesc }),