mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-20 23:02:13 +00:00
refactor static and asset emission to be actual emitter plugins
This commit is contained in:
parent
000eb4c3c0
commit
9e83af04a7
18 changed files with 197 additions and 173 deletions
quartz/plugins/emitters
|
@ -13,12 +13,12 @@ export const AliasRedirects: QuartzEmitterPlugin = () => ({
|
|||
getQuartzComponents() {
|
||||
return []
|
||||
},
|
||||
async emit(contentFolder, _cfg, content, _resources, emit): Promise<FilePath[]> {
|
||||
async emit({argv}, content, _resources, emit): Promise<FilePath[]> {
|
||||
const fps: FilePath[] = []
|
||||
|
||||
for (const [_tree, file] of content) {
|
||||
const ogSlug = canonicalizeServer(file.data.slug!)
|
||||
const dir = path.relative(contentFolder, file.dirname ?? contentFolder)
|
||||
const dir = path.relative(argv.directory, file.dirname ?? argv.directory)
|
||||
|
||||
let aliases: CanonicalSlug[] = []
|
||||
if (file.data.frontmatter?.aliases) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue