Skip to content

Releases: astrolicious/astro-theme-provider

astro-theme-provider@0.5.0

14 May 14:54
ec6582f
Compare
Choose a tag to compare

Minor Changes

  • 5188e12: Added a user facing API for disabling integrations injected by a theme

    import { defineConfig } from "astro/config";
    import myTheme from "my-theme";
    
    export default defineConfig({
      integrations: [
        myTheme({
          integrations: {
            "@astrojs/sitemap": false,
          },
        }),
      ],
    });
  • 5188e12: Updated the type of the user config to z.input instead of z.infer for proper typing

  • cfcdca1: Added a utility to query the final path of a page:

    ---
    import { pages } from 'my-theme:context'
    ---
    
    { pages.has('/blog') &&
      <a href={pages.get('/blog')}>Blog</a>
    }
  • 5188e12: Added a built in virtual module for theme utilities <name>:context.

    This name is now reserved, authors can no longer create custom virtual modules with this name, example:

      defineTheme({
        imports: {
    -     context: {
    +     options: {
            // ...
          }
        }
      })
  • 5188e12: Added a utility to query what integrations are inside the project:

    ---
    import { integrations } from 'my-theme:context'
    
    if (integrations.has('@inox-tools/sitemap-ext')) {
    	import('sitemap-ext:config').then((sitemap) => {
    			sitemap.default(true)
    	})
    }
    ---

astro-theme-provider@0.4.0

07 May 05:20
f7e9992
Compare
Choose a tag to compare

Minor Changes

  • b1947f8: Change virtual module separator from / to :.

    - import "my-theme/styles"
    + import "my-theme:styles"
  • b1947f8: Renamed /css directory to /styles. Change imports as:

    - import "my-theme:css"
    + import "my-theme:styles"

astro-theme-provider@0.2.0

22 Apr 15:08
a49e3dc
Compare
Choose a tag to compare

Minor Changes

  • 1a40dfd: Fixed typing for theme integrations, name property is now required again

  • 9655a45: Added a log option for theme authors

    • false: No logging
    • "minimal" | true: Default logging, includes warnings
    • "verbose": Log everything, including debug information like page injection and static asset handling

    Fixed warnings for a missing README throwing errors if README did not exist

  • ca1f3b3: Updated root directory for glob modules, glob patterns are now relative to a theme's srcDir

     imports: {
    -  css: '**.css'
    +  css: 'css/**.css'
     }
  • 12b5819: Moved the default location of the public dir to the root of a theme

      package/
    + ├── public
      ├── src/
    - │   ├── public
      │   └── ...
      └── ...

Patch Changes

  • b503fed: Upgrade to astro-integration-kit 0.11.0, package HMR is now only applied inside the playground