swup ignore anchor links

This commit is contained in:
cupcakearmy 2019-10-05 18:37:54 +02:00
parent 80f048de3a
commit 5d708919b6
3 changed files with 4 additions and 3 deletions

View File

@ -2,7 +2,7 @@
Theme Name: Liquet
Author: Niccolo Borgioli
Description: Minimalistic clean theme
Version: 0.11
Version: 0.12
License: MIT
Tags: minimal, simple, typography, clean
Author URI: https://nicco.io

View File

@ -1,8 +1,9 @@
import Swup from 'swup'
import SwupPreloadPlugin from '@swup/preload-plugin';
import SwupPreloadPlugin from '@swup/preload-plugin'
export default (fn) => {
const swup = new Swup({
linkSelector: `a[href^="${window.location.origin}"]:not([data-no-swup]), a[href^="/"]:not([data-no-swup])`,
plugins: [new SwupPreloadPlugin()],
containers: ['#app']
})