0.8.1 • Published 2 years ago

@islands/pages v0.8.1

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

An îles module that provides support for pages, inspired by vite-plugin-pages.

  extendFrontmatter (frontmatter, filename) {
    if (filename.includes('/posts/'))
      frontmatter.layout = 'post'
  },
  extendRoute (route) {
    if (route.path.startsWith('/posts'))
      route.path = path.replace(/[\d-]+/, '') // remove date
  },
  extendRoutes (routes) {
    routes.push({ path: '/custom', name: 'Custom', componentFilename: ... }))
  },

extendFrontmatter is very flexible, you could use it to:

  • Infer the title or date from the filename
  • Set a different layout for all pages in a specific dir
  • Provide additional data to use in the page, such as gitLastUpdated

Acknowledgements

0.8.1

2 years ago

0.8.0

2 years ago

0.7.11

2 years ago

0.7.10

2 years ago

0.7.9

2 years ago

0.7.6

2 years ago

0.7.5

2 years ago

0.7.8

2 years ago

0.7.7

2 years ago

0.7.7-0

2 years ago

0.7.4

2 years ago

0.7.3

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago