mirror of
				https://github.com/bartvdbraak/hellob.art.git
				synced 2025-10-30 19:59:10 +00:00 
			
		
		
		
	feat: add import of assets to resolve build path issues
This commit is contained in:
		
							parent
							
								
									b4bf22ea84
								
							
						
					
					
						commit
						19971636d4
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -4,6 +4,7 @@ import { html as toReactNode } from 'satori-html'; | |||
| import { OgImage } from '$lib/components/site'; | ||||
| import GeistRegular from '$lib/assets/og/Geist-Regular.woff'; | ||||
| import GeistBold from '$lib/assets/og/Geist-Bold.woff'; | ||||
| import Me from '$lib/assets/og/me.jpg'; | ||||
| import { readFile } from 'fs/promises'; | ||||
| import path from 'path'; | ||||
| 
 | ||||
|  | @ -12,7 +13,7 @@ const width = 1200; | |||
| 
 | ||||
| const getImageData = async () => { | ||||
| 	// try {
 | ||||
| 	const imagePath = path.join(process.cwd(), 'src', 'lib', 'assets', 'og', 'me.jpg'); | ||||
| 	const imagePath = path.join(process.cwd(), Me); | ||||
| 	const meImage = await readFile(imagePath); | ||||
| 	return Buffer.from(meImage).toString('base64'); | ||||
| 	// } catch (error) {
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue