0

My URL structure is as follows:

http://localhost:8888/cdw/work/foo-bar/ http://localhost:8888/cdw/work/bar-foo/ http://localhost:8888/cdw/work/etc-etc/

I'm using swup JS and the route plugin https://swup.js.org/plugins/route-name-plugin

None of the following are working. please help. I just need to match any URL that has "work"

Not working

new SwupRouteNamePlugin({
    routes: [
        { name: 'work', path: '/work/(.*)'},
    ]
}),

Not working:

new SwupRouteNamePlugin({
    routes: [
        { name: 'work', path: '/work/*'},
    ]
}),

Not working

new SwupRouteNamePlugin({
    routes: [
        { name: 'work', path: '/work/:slug'},
    ]
}),

Not working:

new SwupRouteNamePlugin({
    routes: [
        { name: 'work', path: '/work/'},
    ]
}),

What am i missing here? Please help!

Thanks!!!

enter image description here

1 Answer 1

0

for the url http://localhost:8888/cdw/work/foo-bar/

I needed to include /cdw/, not just /work/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.