Skip to content
Discussion options

You must be logged in to vote

To include the version in the url, you can use the url function. For example, create _data.js file in the folder containing the files do you want to rewrite:

// my-files/_data.js

const version = "v1.2.3";

export function url(page) {
  return `./${page.src.slug}${version}${page.src.ext}`
}

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by allanberry
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants