@eox/pages-theme-eox 0.4.9 → 0.4.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/pages-theme-eox",
3
- "version": "0.4.9",
3
+ "version": "0.4.10",
4
4
  "type": "module",
5
5
  "description": "Vitepress Theme with EOX branding",
6
6
  "main": "src/index.js",
@@ -2,7 +2,7 @@
2
2
  import { useData, withBase } from "vitepress";
3
3
  import { data as features } from "../features.data.js";
4
4
 
5
- const { site } = useData();
5
+ const { page, site } = useData();
6
6
 
7
7
  const featuresExcerpts = features.map((f) => {
8
8
  const el = document.createElement("html");
@@ -14,6 +14,7 @@ const featuresExcerpts = features.map((f) => {
14
14
  description: featureSection.textContent,
15
15
  image: featureSection.getAttribute("image"),
16
16
  link: f.url,
17
+ show: page.value.relativePath.includes(f.url.replace("/", "")),
17
18
  }
18
19
  : false;
19
20
  });
@@ -23,7 +24,9 @@ const featuresExcerpts = features.map((f) => {
23
24
  <h2>Read more about these other {{ site.title }} features:</h2>
24
25
  <div class="grid">
25
26
  <a
26
- v-for="(feature, index) in features.filter((f, i) => featuresExcerpts[i])"
27
+ v-for="(feature, index) in features.filter(
28
+ (f, i) => f.show && featuresExcerpts[i],
29
+ )"
27
30
  class="feature s12 m3"
28
31
  :href="feature.url"
29
32
  >