mirror of https://github.com/thumbsup/thumbsup
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
318 B
JavaScript
10 lines
318 B
JavaScript
const path = require('path')
|
|
|
|
module.exports = (target, options) => {
|
|
const albumPath = options.data.root.album.path
|
|
const relative = path.relative(path.dirname(albumPath), target)
|
|
const url = relative.replace(/\\/g, '/')
|
|
// Escape single/double quotes
|
|
return url.replace(/'/g, '%27').replace(/"/g, '%22')
|
|
}
|