@stephenchenorg/astro 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,9 +4,27 @@ interface Props extends astroHTML.JSX.ImgHTMLAttributes {
4
4
  desktopBlur?: string | null
5
5
  mobile?: string | null
6
6
  mobileBlur?: string | null
7
+
8
+ // GraphQL image props
9
+ desktop_blur?: string | null
10
+ mobile_blur?: string | null
7
11
  }
8
12
 
9
- const { desktop, desktopBlur, mobile, mobileBlur, src: _, ...attributes } = Astro.props
13
+ const {
14
+ desktop,
15
+ desktopBlur: _desktopBlur,
16
+ mobile,
17
+ mobileBlur: _mobileBlur,
18
+
19
+ desktop_blur: _desktop_blur,
20
+ mobile_blur: _mobile_blur,
21
+ src: _src,
22
+
23
+ ...attributes
24
+ } = Astro.props
25
+
26
+ // const desktopBlur = Astro.props.desktopBlur || Astro.props.desktop_blur
27
+ // const mobileBlur = Astro.props.mobileBlur || Astro.props.mobile_blur
10
28
 
11
29
  const breakpoint = 768
12
30
  ---
@@ -4,4 +4,4 @@ export type UseSeoMetaOptions = Partial<Omit<PageMeta, 'title'>> & {
4
4
  description?: string | null;
5
5
  image?: string | null;
6
6
  };
7
- export declare function seoMeta(options: UseSeoMetaOptions, userOptions?: PageMeta): PageMeta;
7
+ export declare function seoMeta(options: UseSeoMetaOptions, modelMeta?: PageMeta): PageMeta;
@@ -1,14 +1,14 @@
1
- export function seoMeta(options, userOptions) {
1
+ export function seoMeta(options, modelMeta) {
2
2
  return {
3
- title: userOptions?.title || options.title,
4
- seo_title: userOptions?.seo_title || options.seo_title || null,
5
- seo_description: userOptions?.seo_description || options.description || null,
6
- seo_keyword: userOptions?.seo_keyword || options.seo_keyword || null,
7
- seo_json_ld: userOptions?.seo_json_ld || options.seo_json_ld || null,
8
- seo_head: userOptions?.seo_head || options.seo_head,
9
- seo_body: userOptions?.seo_body || options.seo_body,
10
- og_title: userOptions?.og_title || options.og_title || options.title || null,
11
- og_description: userOptions?.og_description || options.og_description || options.description || null,
12
- og_image: userOptions?.og_image || options.og_image || options.image || null
3
+ title: modelMeta?.title || options.title,
4
+ seo_title: modelMeta?.seo_title || options.seo_title || null,
5
+ seo_description: modelMeta?.seo_description || options.description || null,
6
+ seo_keyword: modelMeta?.seo_keyword || options.seo_keyword || null,
7
+ seo_json_ld: modelMeta?.seo_json_ld || options.seo_json_ld || null,
8
+ seo_head: modelMeta?.seo_head || options.seo_head,
9
+ seo_body: modelMeta?.seo_body || options.seo_body,
10
+ og_title: modelMeta?.og_title || options.og_title || options.title || null,
11
+ og_description: modelMeta?.og_description || options.og_description || options.description || null,
12
+ og_image: modelMeta?.og_image || options.og_image || options.image || null
13
13
  };
14
14
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@stephenchenorg/astro",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.2",
5
5
  "description": "Stephenchenorg Astro 前端通用套件",
6
6
  "license": "MIT",
7
7
  "homepage": "https://stephenchenorg-astro.netlify.app",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "git+https://github.com/stephenchenorg/astro.git"
10
+ "url": "git+https://github.com/stephenchenorg/package.astro.git"
11
11
  },
12
12
  "keywords": [
13
13
  "astro"