-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a336358
commit 68cbbbe
Showing
7 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ icon: /images/icon-192x192.png | |
keywords: | ||
author: Kristof Zerbe | ||
photo: /images/kristof-zerbe.png | ||
avatar: /images/kristof-zerbe-400.jpg | ||
email: [email protected] | ||
profiles: | ||
mastodon: https://indieweb.social/@kiko | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
const log = require('hexo-log')({ debug: false, silent: false }); | ||
const { magenta } = require('chalk'); | ||
const path = require('path'); | ||
const fs = require("hexo-fs"); | ||
// const { config } = require('process'); | ||
|
||
const _rootDir = hexo.source_dir.replace("source", ""); | ||
|
||
hexo.extend.generator.register("dynamic-about", async function(locals) { | ||
log.info("Generating Dynamic Page " + magenta("ABOUT") + " ..."); | ||
|
||
let config = this.config; | ||
|
||
let result = []; | ||
|
||
let page = locals.dynamic.about; | ||
|
||
return { | ||
result.push({ | ||
data: page, | ||
path: path.join(page.name, "index.html"), | ||
layout: "about" | ||
}; | ||
}); | ||
|
||
// Copy Avatar -> see https://blog.jim-nielsen.com/2023/well-known-avatar/ | ||
/* TODO: Doesn't work this way. File has to return a true JPEG from web server */ | ||
// log.info("Generating File " + magenta(".well-known/avatar")); | ||
// let source = path.join(_rootDir, config.static_dir, config.avatar); | ||
// let target = path.join(hexo.public_dir, ".well-known/avatar"); | ||
// fs.copyFile(source, target); | ||
|
||
return result; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters