You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 😞, or anything alike for that matter)
Note that we are using an outdated version of Vuepress (1.9.10), I don't think anything would change.
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 the 404.vue layout file.
The solution I came up with is to use the needed JavaScript for pages in the Layout.vue file:
@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 AlmaLinux/almalinux.org#619 is resolved as they're tangentially related. I'll aim to merge these both be EOW or sooner!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/themedirectory 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 😞, or anything alike for that matter)Then I had to remove the script tag from the header tag in the
.vuepress/config.jsfile 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.vuelayout file.The solution I came up with is to use the needed JavaScript for pages in the
Layout.vuefile:And the needed JavaScript for 404s in the
404.vuefile: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/themedirectory..vuepress/config.jsfile.Layout,vuefile.404.vuefile.I know these are huge changes, let me know what you guys think.
Maybe I missed something. 😄