quartz icon indicating copy to clipboard operation
quartz copied to clipboard

Q: how to add custom scripts to the final build?

Open y9san9 opened this issue 1 month ago • 2 comments

Hey! I use custom scripts on y9san9.me to create live counter of my birthday and other interactive stuff. It works fine but now I want to implement views counter using supabase. And this time I don't want to write javascript, but rather refactor my previous scripts and write a new one in typescript. You already have some build system for typescript. So where should I place my own ts files for them to later be exposed in the final build?

y9san9 avatar Nov 29 '25 03:11 y9san9

I believe you can custom your quartz component and pass into Plugin.ContentPage emitter under quartz.config.ts

Plugin.ContentPage({
        footer: ...
})
      

You can inject to any of

export interface FullPageLayout {
  head: QuartzComponent
  header: QuartzComponent[]
  beforeBody: QuartzComponent[]
  pageBody: QuartzComponent
  afterBody: QuartzComponent[]
  left: QuartzComponent[]
  right: QuartzComponent[]
  footer: QuartzComponent
}

Nambers avatar Dec 04 '25 17:12 Nambers

What if I want it to be inline and on a single page? Like the age counter on https://y9san9.me

I can do

and then I don't know where to put my custom js (for now I just embedded a script that lives under the content folder)

y9san9 avatar Dec 05 '25 07:12 y9san9