|
|
|
@ -94,6 +94,7 @@ export default {
|
|
|
|
|
title: 'My Awesome Site'
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```md
|
|
|
|
|
# Hello
|
|
|
|
|
```
|
|
|
|
@ -113,6 +114,7 @@ export default {
|
|
|
|
|
titleTemplate: 'Custom Suffix'
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```md
|
|
|
|
|
# Hello
|
|
|
|
|
```
|
|
|
|
@ -159,8 +161,29 @@ export default {
|
|
|
|
|
[
|
|
|
|
|
'link',
|
|
|
|
|
{ rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }
|
|
|
|
|
// would render:
|
|
|
|
|
//
|
|
|
|
|
// <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
'script',
|
|
|
|
|
{ id: 'register-sw' },
|
|
|
|
|
`;(() => {
|
|
|
|
|
if ('serviceWorker' in navigator) {
|
|
|
|
|
navigator.serviceWorker.register('/sw.js')
|
|
|
|
|
}
|
|
|
|
|
})()`
|
|
|
|
|
// would render:
|
|
|
|
|
//
|
|
|
|
|
// <script id="register-sw">
|
|
|
|
|
// ;(() => {
|
|
|
|
|
// if ('serviceWorker' in navigator) {
|
|
|
|
|
// navigator.serviceWorker.register('/sw.js')
|
|
|
|
|
// }
|
|
|
|
|
// })()
|
|
|
|
|
// </script>
|
|
|
|
|
]
|
|
|
|
|
// would render: <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
@ -295,7 +318,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
It can also be an array of extact url string, regex patterns, or custom filter functions.
|
|
|
|
|
It can also be an array of exact url string, regex patterns, or custom filter functions.
|
|
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
export default {
|
|
|
|
|