quartz icon indicating copy to clipboard operation
quartz copied to clipboard

fix(alias): permalink and alias resolution

Open saberzero1 opened this issue 10 months ago • 3 comments

Closes https://github.com/jackyzha0/quartz/issues/1397

Addresses permalink and alias/aliases frontmatter values not generating files properly.

  • permalink will now properly create canonical redirect pages.
  • alias/aliases will now create canonical pages with absolute path instead of relative. (alias: "world" inside /hello/goodbye.md will now be /world.html instead of /hello/world.html)

@stanislavkozlovski please verify if this PR resolves your issue.

saberzero1 avatar Mar 04 '25 14:03 saberzero1

Good bot.

saberzero1 avatar Mar 04 '25 14:03 saberzero1

@saberzero1 sorry, I missed this.

It throws a compilation error rn:


✘ [ERROR] Unexpected ","

    quartz/plugins/emitters/aliases.ts:48:3:
      48 │   },
         ╵    ^

Couldn't parse Quartz configuration: ./quartz/build.ts
TypeError [ERR_INVALID_ARG_TYPE]: The "text" argument must be of type string. Received an instance of Error
    at styleText (node:util:119:3)
    at file:///Users/stanislavkozlovski/Downloads/personal_code/topicpartition/quartz/cli/handlers.js:321:30
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async build (file:///Users/stanislavkozlovski/Downloads/personal_code/topicpartition/quartz/cli/handlers.js:319:20)
    at async handleBuild (file:///Users/stanislavkozlovski/Downloads/personal_code/topicpartition/quartz/cli/handlers.js:355:5)
    at async Object.handler (file:///Users/stanislavkozlovski/Downloads/personal_code/topicpartition/quartz/bootstrap-cli.mjs:36:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}

cc @Nambers as you recently produced such a PR too at https://github.com/jackyzha0/quartz/pull/2097

It would be good to close this out!

stanislavkozlovski avatar Oct 19 '25 09:10 stanislavkozlovski

cc @Nambers as you recently produced such a PR too at https://github.com/jackyzha0/quartz/pull/2097

ok I'll reopen the PR

EDIT: good to go

Nambers avatar Oct 19 '25 19:10 Nambers