Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
dermatthes committed Nov 24, 2023
1 parent c1739f3 commit 225cb83
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leuffen/jodastyle",
"version": "3.0.7",
"version": "3.0.8",
"description": "",
"main": "./dist/index.js",
"module": "./dist/index.module.js",
Expand Down
24 changes: 22 additions & 2 deletions src/helper/JodaDescriptionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ type Description = {
category: "page"|"hero"|"element"|"section"|"footer",
className: string,
description: string,
example : string,
example : string|null,
exampleUri : string|null,
modifiers: Modifiers[]
config: Config
}

interface Config {
interface Config {
bodyClasses?: string[];
parseMarkdown?: boolean;
}
Expand Down Expand Up @@ -39,6 +40,25 @@ export class __JodaDescriptionManager {
}


public addMarkdownPage(uri : string, name: string) {
if (window["jodastyle"] === undefined) {
window["jodastyle"] = {};
}
if (window["jodastyle"]["descriptions"] === undefined) {
window["jodastyle"]["descriptions"] = [];
}
window["jodastyle"]["descriptions"].push({
category: "page",
className: name,
description: "A page with markdown content",
exampleUri: uri,
modifiers: [],
config: {
parseMarkdown: true
}
});
}

get data() : Description[] {
if (window["jodastyle"] === undefined) {
console.warn("[jodastyle description manager] No jodastyle descriptions found (Make sure you imported a theme) => window.jodastyle is undefined");
Expand Down

0 comments on commit 225cb83

Please sign in to comment.