MCPcopy Create free account
hub / github.com/LearnPrompt/LearnPrompt / createEmbedCode

Function createEmbedCode

scripts/dyno_to_new_embed.ts:53–58  ·  view source on GitHub ↗
(config: UrlConfig)

Source from the content-addressed store, hash-verified

51const BASE_URL = 'https://embed.learnprompting.org'; // Replace this with your actual base URL
52
53const createEmbedCode = (config: UrlConfig): string => {
54 const query = encodeUrlConfig(config)
55 const url = `${BASE_URL}/embed?config=${query}`
56 const height = config.boxRows ? `${50 * config.boxRows}px` : '500px';
57 return JSX_TEMPLATE.replace("%URL%", url).replace("%HEIGHT%", height);
58}
59
60// Function to recursively iterate through all files in a given path
61function processDirectory(directory: string) {

Callers 1

processFileFunction · 0.85

Calls 1

encodeUrlConfigFunction · 0.85

Tested by

no test coverage detected