fluent-emoji-flat:building-construction

埋め込み機能のテスト

2023/12/09 に公開

Open Graph Protocol を利用したリンクカード

インラインなリンクはカード化しない

According to the spec, …

https://zenn.dev/yusukebe/articles/7c9f96f8c52b8a is a

https://zenn.dev/yusukebe/articles/7c9f96f8c52b8a https://zenn.dev/yusukebe/articles/7c9f96f8c52b8a

埋め込み機能

Twitter

ツイートが存在しない場合:

Gist

const main = () => {
const getElementById = <T extends HTMLElement>(id: string): T | undefined => (document.getElementById(id) ?? undefined) as T | undefined;
const tocElem = getElementById<HTMLDivElement>("TOC");
if (!tocElem) { throw new Error("TOC element not found"); }
document.body.style.margin = "0 auto"
document.body.style.maxWidth = "68rem"
// create sidebar div
const sidebar = document.createElement("div");
sidebar.id = "toc-sidebar";
sidebar.style.position = "fixed";
sidebar.style.top = "0";
sidebar.style.overflowY = "auto";
sidebar.style.height = "100vh";
sidebar.style.width = "20rem";
sidebar.innerHTML = tocElem.innerHTML;
// create content div
const content = document.createElement("div");
content.id = "toc-content";
content.style.maxWidth = "100%";
content.style.marginLeft = "22rem";
content.innerHTML = document.body.innerHTML;
// append sidebar and content to body
document.body.innerHTML = "";
document.body.appendChild(sidebar);
document.body.appendChild(content);
}
main()
view raw extension.ts hosted with ❤ by GitHub

Hello, World!

Sample post for testing purposes.

Bold text
Italic text
Strikethrough text
Inline code
example.com

Done is better than perfect.

List

  • unordered list item 1
  • unordered list item 2
    • unordered list item 2.1
    • unordered list item 2.2
  1. ordered list item 1
  2. ordered list item 2
    1. ordered list item 2.1
    2. ordered list item 2.2

Code

Inline code: print("Hello, World!")

def hello_world():
    print("Hello, World!")
fn main() {
    println!("Hello, World!");
}
const helloWorld = () => {
  console.log("Hello, World!");
};

Math

Inline math: $e^{i\pi} + 1 = 0$

Block math:

$$ \forall \epsilon > 0, \exists \delta > 0 \mathrm{s.t.} 0 < |x - a| < \delta \implies |f(x) - b| < \epsilon $$

Image

icon_blobs

Heading 2

Heading 3

Heading 4

view raw hoge.md hosted with ❤ by GitHub

CodePen, JSFiddle, StackBlitz, CodeSandbox

その他 (oEmbed)

What's a modern day poison people willingly ingest?
by in AskReddit

ChatGPT and the Future of Work - Clark Boyd from Clark Boyd