How to change page metadata ? #154
-
Hello ! I just want to whenever I click in a specific button, it modifies the ArchivePageSize metadata in the index page, to load more posts, how should I proceed ? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi! There may be some confusion about how static generators work. Statiq generates HTML and other files that get sent to the web browser. At “runtime” (I.e. when the user is browsing the site), Statiq is completely out of the picture. Any dynamic client behavior needs to be implemented in JavaScript (and that’s not to say a static site can’t have lots of dynamic client behavior - just that it needs to be provided by client-side code). Because of that, mixing things like clicking buttons (a runtime behavior) with page metadata (a generation-time concept) doesn’t really work. Does that make sense? |
Beta Was this translation helpful? Give feedback.
Hi! There may be some confusion about how static generators work. Statiq generates HTML and other files that get sent to the web browser. At “runtime” (I.e. when the user is browsing the site), Statiq is completely out of the picture. Any dynamic client behavior needs to be implemented in JavaScript (and that’s not to say a static site can’t have lots of dynamic client behavior - just that it needs to be provided by client-side code). Because of that, mixing things like clicking buttons (a runtime behavior) with page metadata (a generation-time concept) doesn’t really work.
Does that make sense?