refactor viewtranstion config option from disableViewTransitions default: false to useViewTransitions with default:true
This commit is contained in:
parent
f535a4720f
commit
c1e6e7ede2
|
@ -54,7 +54,7 @@ export default defineConfig({
|
||||||
astroHashnode({
|
astroHashnode({
|
||||||
hashnodeURL: 'astroplayground.hashnode.dev', // Your hashnode URL
|
hashnodeURL: 'astroplayground.hashnode.dev', // Your hashnode URL
|
||||||
landingPage: true, // Lets you disable the default landing page!
|
landingPage: true, // Lets you disable the default landing page!
|
||||||
disableViewTransitions: false, // Lets you disable the Default included ViewTransitions.
|
useViewTransitions: true, // Lets you enable/disable the default included ViewTransitions.
|
||||||
layoutComponent: './src/layouts/YourLayout.astro' // Lets you change the default Layout.astro being used by the Integration Pages.
|
layoutComponent: './src/layouts/YourLayout.astro' // Lets you change the default Layout.astro being used by the Integration Pages.
|
||||||
verbose: false // Change to Verbose console output
|
verbose: false // Change to Verbose console output
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,7 +9,7 @@ import type { AstroHashnodeLayoutProps } from '../proptypes/layouttypes'
|
||||||
import { ViewTransitions } from 'astro:transitions';
|
import { ViewTransitions } from 'astro:transitions';
|
||||||
import config from "virtual:astro-hashnode/config";
|
import config from "virtual:astro-hashnode/config";
|
||||||
|
|
||||||
const useTranstions:boolean = !config.disableViewTransitions;
|
const useTranstions = config.useViewTransitions;
|
||||||
|
|
||||||
const pubData = await getPublication();
|
const pubData = await getPublication();
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,11 @@ export const optionsSchema = z.object({
|
||||||
*/
|
*/
|
||||||
landingPage: z.boolean().default(true),
|
landingPage: z.boolean().default(true),
|
||||||
/**
|
/**
|
||||||
* Allows the user to disable the Astro ViewTransitions component.
|
* Allows the user to enable/disable the Astro ViewTransitions component.
|
||||||
* @default false
|
* @default true
|
||||||
* @see https://docs.astro.build/en/guides/view-transitions/ for more information about ViewTransitions
|
* @see https://docs.astro.build/en/guides/view-transitions/ for more information about ViewTransitions
|
||||||
*/
|
*/
|
||||||
disableViewTransitions: z.boolean().default(false),
|
useViewTransitions: z.boolean().default(true),
|
||||||
/**
|
/**
|
||||||
* Allows the user to change the layout component used for Astro-Hashnode pages.
|
* Allows the user to change the layout component used for Astro-Hashnode pages.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue