Skip to content

Commit 5f69f2d

Browse files
committed
move og image path file from utils to lib
1 parent e885d80 commit 5f69f2d

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

docs/working-notes/todo3.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,11 @@ restyle scroll to top, must be moved from solid to astro - cactus
395395
satori can define og image with html, astro-canvas limited
396396
satori understands only react jsx, not solid-js
397397
solid-js style prop dash case 'border-radius': '3px'
398-
use satori vercel playground for design og image and research examples
399-
og image getStaticPath paths
398+
use satori vercel playground for design og image and research examples
399+
og image getStaticPath paths
400400
handle long site url in og template
401401
add random hero images for mdx and list pages, and maybe random gradient, handle longer domain in new row
402-
fix folders in assets/images
403-
pages/design, sve .mdx index stranice, fix in metadata, endsWith('/')
402+
fix folders in assets/images
403+
pages/design, sve .mdx index stranice, fix in metadata, endsWith('/') // fixed in getPages()
404404
```
405405

src/layouts/Page.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import Centered from '@/layouts/Centered.astro';
3-
import { getOpenGraphImagePath } from '@/utils/open-graph-image';
3+
import { getOpenGraphImagePath } from '@/libs/api/open-graph/image-path';
44
55
export interface Content {
66
title: string;

src/utils/open-graph-image.ts renamed to src/libs/api/open-graph/image-path.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const getPagePrefix = (path: string): OgImagePrefixType => {
4343
};
4444

4545
// use pageId: page404 from frontmatter instead in Page layout
46-
/** pre-rendered og images in getStaticPaths */
46+
/** not used, pre-rendered og images in getStaticPaths */
4747
export const isExistingOgImage = async (path: string): Promise<boolean> => {
4848
const trimmedPath = removeLeadingAndTrailingSlashes(path);
4949

src/pages/blog/[slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import TagList from '@/components/TagList.astro';
1313
import { draftText } from '@/constants/data';
1414
import { IMAGE_SIZES } from '@/constants/image';
1515
import { ROUTES } from '@/constants/routes';
16-
import { getOpenGraphImagePath } from '@/utils/open-graph-image';
16+
import { getOpenGraphImagePath } from '@/libs/api/open-graph/image-path';
1717
1818
import type { Metadata } from '@/types/common';
1919
import type { Post } from '@/types/post';

src/pages/projects/[slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getAllProjects } from '@/modules/project';
33
import Project from '@/layouts/Project.astro';
44
import Share from '@/components/Share.astro';
55
import { ROUTES } from '@/constants/routes';
6-
import { getOpenGraphImagePath } from '@/utils/open-graph-image';
6+
import { getOpenGraphImagePath } from '@/libs/api/open-graph/image-path';
77
88
import type { Metadata } from '@/types/common';
99

src/utils/metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DEFAULT_METADATA, dotSeparator, PAGE_METADATA } from '@/constants/metadata';
22
import { CONFIG } from '@/config';
3-
import { getOpenGraphImagePath } from '@/utils/open-graph-image';
3+
import { getOpenGraphImagePath } from '@/libs/api/open-graph/image-path';
44

55
import type { Metadata } from '@/types/common';
66
import type { PageMetadataKey } from '@/types/constants';

0 commit comments

Comments
 (0)