Skip to content

Commit

Permalink
move og image path file from utils to lib
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjam committed Jul 13, 2024
1 parent e885d80 commit 5f69f2d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions docs/working-notes/todo3.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,11 @@ restyle scroll to top, must be moved from solid to astro - cactus
satori can define og image with html, astro-canvas limited
satori understands only react jsx, not solid-js
solid-js style prop dash case 'border-radius': '3px'
use satori vercel playground for design og image and research examples
og image getStaticPath paths
use satori vercel playground for design og image and research examples
og image getStaticPath paths
handle long site url in og template
add random hero images for mdx and list pages, and maybe random gradient, handle longer domain in new row
fix folders in assets/images
pages/design, sve .mdx index stranice, fix in metadata, endsWith('/')
fix folders in assets/images
pages/design, sve .mdx index stranice, fix in metadata, endsWith('/') // fixed in getPages()
```

2 changes: 1 addition & 1 deletion src/layouts/Page.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Centered from '@/layouts/Centered.astro';
import { getOpenGraphImagePath } from '@/utils/open-graph-image';
import { getOpenGraphImagePath } from '@/libs/api/open-graph/image-path';
export interface Content {
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const getPagePrefix = (path: string): OgImagePrefixType => {
};

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

Expand Down
2 changes: 1 addition & 1 deletion src/pages/blog/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import TagList from '@/components/TagList.astro';
import { draftText } from '@/constants/data';
import { IMAGE_SIZES } from '@/constants/image';
import { ROUTES } from '@/constants/routes';
import { getOpenGraphImagePath } from '@/utils/open-graph-image';
import { getOpenGraphImagePath } from '@/libs/api/open-graph/image-path';
import type { Metadata } from '@/types/common';
import type { Post } from '@/types/post';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/projects/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getAllProjects } from '@/modules/project';
import Project from '@/layouts/Project.astro';
import Share from '@/components/Share.astro';
import { ROUTES } from '@/constants/routes';
import { getOpenGraphImagePath } from '@/utils/open-graph-image';
import { getOpenGraphImagePath } from '@/libs/api/open-graph/image-path';
import type { Metadata } from '@/types/common';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/metadata.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DEFAULT_METADATA, dotSeparator, PAGE_METADATA } from '@/constants/metadata';
import { CONFIG } from '@/config';
import { getOpenGraphImagePath } from '@/utils/open-graph-image';
import { getOpenGraphImagePath } from '@/libs/api/open-graph/image-path';

import type { Metadata } from '@/types/common';
import type { PageMetadataKey } from '@/types/constants';
Expand Down

0 comments on commit 5f69f2d

Please sign in to comment.