config | component
This commit is contained in:
parent
e87304508f
commit
24a20b571b
@ -8,10 +8,10 @@ export const invalid_urls = ["https://example.com/non-existent-image.jpg"];
|
|||||||
export const real_urls = [
|
export const real_urls = [
|
||||||
"https://picsum.photos/200/300",
|
"https://picsum.photos/200/300",
|
||||||
"https://fastly.picsum.photos/id/343/200/300.jpg?hmac=_7ttvLezG-XONDvp0ILwQCv50ivQa_oewm7m6xV2uZA",
|
"https://fastly.picsum.photos/id/343/200/300.jpg?hmac=_7ttvLezG-XONDvp0ILwQCv50ivQa_oewm7m6xV2uZA",
|
||||||
"https://assets.osr-plastic.org//products/sheetpress/cassandra-edczmax-rc2/media/gallery/latest_controller.jpg",
|
"https://assets.files.polymech.info//products/sheetpress/cassandra-edczmax-rc2/media/gallery/latest_controller.jpg",
|
||||||
"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=800&h=400&fit=crop",
|
"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=800&h=400&fit=crop",
|
||||||
"https://assets.osr-plastic.org//products/sheetpress/cassandra-edczmax-rc2/media/samples/30mm.jpg",
|
"https://assets.files.polymech.info//products/sheetpress/cassandra-edczmax-rc2/media/samples/30mm.jpg",
|
||||||
"https://assets.osr-plastic.org//products/sheetpress/cassandra-edczmax-rc2/media/samples/DSC05051.JPG",
|
"https://assets.files.polymech.info//products/sheetpress/cassandra-edczmax-rc2/media/samples/DSC05051.JPG",
|
||||||
];
|
];
|
||||||
|
|
||||||
export const default_options = {
|
export const default_options = {
|
||||||
|
|||||||
@ -41,7 +41,7 @@ describe("getResolvedSrc", () => {
|
|||||||
|
|
||||||
it("should download another image and verify its height", async () => {
|
it("should download another image and verify its height", async () => {
|
||||||
const src =
|
const src =
|
||||||
"https://assets.osr-plastic.org//products/sheetpress/cassandra-edczmax-rc2/media/gallery/latest_controller.jpg";
|
"https://assets.files.polymech.info//products/sheetpress/cassandra-edczmax-rc2/media/gallery/latest_controller.jpg";
|
||||||
const result = await getResolvedSrc(src);
|
const result = await getResolvedSrc(src);
|
||||||
|
|
||||||
const imagePath = path.join(process.cwd(), result.src);
|
const imagePath = path.join(process.cwd(), result.src);
|
||||||
|
|||||||
@ -109,7 +109,7 @@
|
|||||||
},
|
},
|
||||||
"pages": {
|
"pages": {
|
||||||
"home": {
|
"home": {
|
||||||
"hero": "https://assets.osr-plastic.org/machines//assets/newsletter/common/products/extruders/overview-3.jpg",
|
"hero": "https://assets.files.polymech.info/machines//assets/newsletter/common/products/extruders/overview-3.jpg",
|
||||||
"_blog": {
|
"_blog": {
|
||||||
"store": "resources"
|
"store": "resources"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"site": {
|
"site": {
|
||||||
"title": "Polymech",
|
"title": "Polymech",
|
||||||
"base_url": "https://creava.org/",
|
"base_url": "https://creava.org/",
|
||||||
"description" : "",
|
"description": "",
|
||||||
"base_path": "/",
|
"base_path": "/",
|
||||||
"trailing_slash": false,
|
"trailing_slash": false,
|
||||||
"favicon": "/images/favicon.png",
|
"favicon": "/images/favicon.png",
|
||||||
@ -15,7 +15,7 @@
|
|||||||
"default": "/images/default-image.png",
|
"default": "/images/default-image.png",
|
||||||
"error": "/images/error-image.png",
|
"error": "/images/error-image.png",
|
||||||
"alt": "Astrofront",
|
"alt": "Astrofront",
|
||||||
"src": "https://assets.osr-plastic.org/machines//assets/newsletter/common/products/extruders/overview-3.jpg"
|
"src": "https://assets.files.polymech.info/machines//assets/newsletter/common/products/extruders/overview-3.jpg"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"footer_left": [
|
"footer_left": [
|
||||||
@ -26,15 +26,13 @@
|
|||||||
{
|
{
|
||||||
"href": "/infopages/contact",
|
"href": "/infopages/contact",
|
||||||
"text": "Contact"
|
"text": "Contact"
|
||||||
} ,
|
},
|
||||||
{
|
{
|
||||||
"href": "/newsletter/newsletter_2024_09_en-hugo-release.html",
|
"href": "/newsletter/newsletter_2024_09_en-hugo-release.html",
|
||||||
"text": "Newsletter"
|
"text": "Newsletter"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"footer_right": [
|
"footer_right": [],
|
||||||
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"search": true,
|
"search": true,
|
||||||
"account": true,
|
"account": true,
|
||||||
@ -74,10 +72,10 @@
|
|||||||
"featured_products": "featured-products"
|
"featured_products": "featured-products"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pages":{
|
"pages": {
|
||||||
"home":{
|
"home": {
|
||||||
"hero": "https://assets.osr-plastic.org/machines//assets/newsletter/common/products/extruders/overview-3.jpg",
|
"hero": "https://assets.files.polymech.info/machines//assets/newsletter/common/products/extruders/overview-3.jpg",
|
||||||
"blog":{
|
"blog": {
|
||||||
"store": "resources"
|
"store": "resources"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,4 +83,4 @@
|
|||||||
"tracking": {
|
"tracking": {
|
||||||
"googleAnalytics": "G-RW6Q6EG3J0"
|
"googleAnalytics": "G-RW6Q6EG3J0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,9 +1,4 @@
|
|||||||
---
|
---
|
||||||
// import "../styles/flowbite.css"
|
|
||||||
|
|
||||||
// import "../styles/global.css"
|
|
||||||
// import "../styles/custom.scss"
|
|
||||||
|
|
||||||
import { sync as read } from '@polymech/fs/read'
|
import { sync as read } from '@polymech/fs/read'
|
||||||
import { default as AstroSeo } from "../seo/AstroSeo.astro"
|
import { default as AstroSeo } from "../seo/AstroSeo.astro"
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,19 @@
|
|||||||
import { AppConfig } from './app/config.schema.js'
|
import { AppConfig } from './app/config.schema.js'
|
||||||
|
|
||||||
|
|
||||||
|
export type { PolymechConfig };
|
||||||
|
|
||||||
|
import * as fs from 'node:fs';
|
||||||
|
import * as path from 'node:path';
|
||||||
|
|
||||||
|
// LLM Registry for aggregating content
|
||||||
|
export interface LLMItem {
|
||||||
|
title: string;
|
||||||
|
url: string;
|
||||||
|
description: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
interface PolymechConfig {
|
interface PolymechConfig {
|
||||||
// Config groups matching app-config.json
|
// Config groups matching app-config.json
|
||||||
site?: any;
|
site?: any;
|
||||||
@ -150,18 +165,6 @@ class PolymechRegistry {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const PolymechInstance = PolymechRegistry.getInstance();
|
|
||||||
export type { PolymechConfig };
|
|
||||||
|
|
||||||
import * as fs from 'node:fs';
|
|
||||||
import * as path from 'node:path';
|
|
||||||
|
|
||||||
// LLM Registry for aggregating content
|
|
||||||
export interface LLMItem {
|
|
||||||
title: string;
|
|
||||||
url: string;
|
|
||||||
description: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const getCachePath = () => {
|
const getCachePath = () => {
|
||||||
const cacheDir = path.join(process.cwd(), 'node_modules', '.cache');
|
const cacheDir = path.join(process.cwd(), 'node_modules', '.cache');
|
||||||
@ -211,3 +214,5 @@ export class LLMRegistry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const PolymechInstance = PolymechRegistry.getInstance();
|
||||||
Loading…
Reference in New Issue
Block a user