vowel 0.1.37 → 0.1.39
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
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.1.39](https://github.com/samlfair/vowel/compare/v0.1.38...v0.1.39) (2024-10-17)
|
|
6
|
+
|
|
7
|
+
## [0.1.38](https://github.com/samlfair/vowel/compare/v0.1.37...v0.1.38) (2024-10-17)
|
|
8
|
+
|
|
5
9
|
## [0.1.37](https://github.com/samlfair/vowel/compare/v0.1.36...v0.1.37) (2024-10-17)
|
|
6
10
|
|
|
7
11
|
|
package/package.json
CHANGED
|
@@ -96,13 +96,13 @@ export default async function mutateMarkdownFrontmatter(frontmatter, cache, webm
|
|
|
96
96
|
og_image: url['og:image']
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
if(webmentions && !webmentions.find(webmention => webmention.target ===
|
|
99
|
+
if(webmentions && !webmentions.find(webmention => webmention.target === input)) {
|
|
100
100
|
webmentions.push({
|
|
101
101
|
target: input,
|
|
102
102
|
status: "new"
|
|
103
103
|
})
|
|
104
104
|
} else if (webmentions) {
|
|
105
|
-
const webmention = webmentions.find(webmention => webmention.target ===
|
|
105
|
+
const webmention = webmentions.find(webmention => webmention.target === input)
|
|
106
106
|
if(webmention.status === "new") {
|
|
107
107
|
webmention.status = await sendWebmention(metadata.responseBody)
|
|
108
108
|
}
|
|
@@ -11,7 +11,6 @@ export const prerender = true;
|
|
|
11
11
|
|
|
12
12
|
async function getPublishedData(domain) {
|
|
13
13
|
try {
|
|
14
|
-
console.log({domain})
|
|
15
14
|
const publishedURL = new URL("/$vowel/published.json", domain)
|
|
16
15
|
const publishedDataResponse = await fetch(publishedURL.href)
|
|
17
16
|
const publushedDataJSON = await publishedDataResponse.json()
|
|
@@ -31,12 +30,13 @@ export async function GET() {
|
|
|
31
30
|
const settingsExists = await checkFileExists(settingsPath);
|
|
32
31
|
if(settingsExists) {
|
|
33
32
|
settings = await readMarkdownFile(settingsPath)
|
|
34
|
-
console.log({settings})
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
// Get published articles from live site
|
|
38
36
|
const publishedData = await getPublishedData(settings.frontmatter.domain)
|
|
39
37
|
|
|
38
|
+
console.log({publish: $publish[0]})
|
|
39
|
+
|
|
40
40
|
if($publish[0]) {
|
|
41
41
|
const initialCache = await loadCache($home[0]);
|
|
42
42
|
|
|
@@ -48,6 +48,8 @@ export async function GET() {
|
|
|
48
48
|
'Content-Type': 'text/plain'
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
+
console.log({ publishedData })
|
|
52
|
+
|
|
51
53
|
const response = new Response(JSON.stringify(publishedData), {
|
|
52
54
|
headers
|
|
53
55
|
});
|