diff --git a/README.md b/README.md index 3289bb3..035b597 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,14 @@ Frontmatter level props on a document always takes precedence over Repository le fontSize: 120%; ``` +4. **I need an emoji instead of image** + + You can pass in the unicode representation of the emoji from the [List](https://unicode.org/emoji/charts/full-emoji-list.html) in `imageUrl` prop. + +5. **I need to format the title** + + The `title` prop supports markdown, feel _free_ to _use_ it. + ### I need more customisation on the output. The generator uses a web component to create the default output and provides a repository level prop to customise this web component. diff --git a/__tests__/generate-html.test.ts b/__tests__/generate-html.test.ts index b44ecda..6239e5f 100644 --- a/__tests__/generate-html.test.ts +++ b/__tests__/generate-html.test.ts @@ -61,8 +61,12 @@ describe("Generate HTML", () => { it("process emojis", () => { const result = generateHtml({ - imageUrl: "😍" + imageUrl: "😍", + title: "Generating open graph images with Github Actions", + subtitle: "Works with Markdown files", + componentUrl: "https://unpkg.com/@agney/og-image-element@0.2.0" }); + console.log(result); expect(result.includes(`class="emoji"`)).toBe(true); }); }); diff --git a/action.yml b/action.yml index 53d2df7..1ddf2fb 100644 --- a/action.yml +++ b/action.yml @@ -19,7 +19,7 @@ inputs: default: "#000000" componentUrl: description: "URL for web component" - default: "https://unpkg.com/@agney/og-image-element@0.2.2" + default: "https://unpkg.com/@agney/og-image-element@0.2.3" fontSize: description: "Font size for the root" default: "100%" diff --git a/demo/test-file.md b/demo/test-file.md index 35413d6..73020d8 100644 --- a/demo/test-file.md +++ b/demo/test-file.md @@ -4,7 +4,8 @@ description: Nothing to see here ogImage: title: Generating *open graph* images with Github Actions subtitle: Works with Markdown files - imageUrl: 😍 + imageUrl: "🥳" + background: "linear-gradient(to right, #000428, #004e92)" filename: this-file --- diff --git a/demo/this-file.jpg b/demo/this-file.jpg index bec63ab..b2e15ad 100644 Binary files a/demo/this-file.jpg and b/demo/this-file.jpg differ