Open Noam-Alum opened 1 month ago
@codyro @jonathanspw @sboldyreva this seems sane to me, and seems to take all of the concerns from #467 into account. Do any of you see any problems here? The questions for me are around the automated deployments and the upgrades to vuepress, but I can't recall if we're even doing the second one regularly.
@codyro @jonathanspw @sboldyreva this seems sane to me, and seems to take all of the concerns from #467 into account. Do any of you see any problems here? The questions for me are around the automated deployments and the upgrades to vuepress, but I can't recall if we're even doing the second one regularly.
I assigned #467 (the issue for this PR) to me to go over it once https://github.com/AlmaLinux/almalinux.org/pull/619 is resolved as they're tangentially related. I'll aim to merge these both be EOW or sooner!
Added Matomo 404 page tracking.
This is referring to this issue.
This is a huge PR, I tried to overwrite the 404 page with no success and nothing on the web worked. It seems like when you create the
.vuepress/theme
directory Vuepress is treating it like a whole new theme which lead me to copy the entire theme to this directory. (Believe me I read through their whole docs this does not work :disappointed:, or anything alike for that matter)Then I had to remove the script tag from the header tag in the
.vuepress/config.js
file since this script tag is on every page (including the 404 page), I cannot simply "Add the Matomo tracking code in this custom 404 page...before the line" since it's in the header and cannot be changed from the404.vue
layout file.The solution I came up with is to use the needed JavaScript for pages in the
Layout.vue
file:And the needed JavaScript for 404s in the
404.vue
file:I proved that this works by generating the site and checking all of the js files (yes I went one by one) to see if they include the needed JavaScript:
404 page:
HTML tag:
JavaScript:
Any page:
HTML tag:
JavaScript:
List of changes:
.vuepress/theme
directory..vuepress/config.js
file.Layout,vue
file.404.vue
file.I know these are huge changes, let me know what you guys think.
Maybe I missed something. :smile: