Skip to content

Commit

Permalink
Merge pull request #495 from zenn-dev/fix-examples
Browse files Browse the repository at this point in the history
zenn-cli の articles の example を整理
  • Loading branch information
cm-igarashi-ryosuke authored Jun 4, 2024
2 parents e0d0abe + 457525c commit c419bb4
Show file tree
Hide file tree
Showing 21 changed files with 1,003 additions and 741 deletions.
596 changes: 596 additions & 0 deletions packages/zenn-cli/articles/100-example-markdown-guide.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: 'TOC'
title: 'ToCのテスト'
type: 'tech' # or "idea"
topics:
- React
- Rust
emoji: 👩‍💻
published: false
published: true
---

# H1 はプレビュー対象
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: 'example images'
title: '画像のテスト'
type: 'idea'
topics:
- Zenn
emoji: 🏙
published: false
published: true
---

## 正しい指定
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: 'Code Fence'
title: 'Code Fenceのテスト'
type: 'tech' # or "idea"
topics:
- React
- Rust
emoji: 👩‍💻
published: false
published: true
---

```"><img/onerror="alert(location)"src=.>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
---
title: 'link card'
type: 'idea' # or "idea"
topics:
- React
- Rust
emoji: 👩‍💻
published: false
title: '埋め込みのテスト(基本)'
type: 'tech' # or "idea"
topics: ['embed', 'test']
emoji: 🐲
published: true
---

# convert
## Link Card

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
### Default

https://zenn.dev
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
https://zenn.dev/catnose99/articles/zenn-dev-stack
https://zenn.dev/topics
https://zenn404

### GitHub Repository

https://github.com/zenn-dev/zenn-editor

### GitHub Repository 以外のページ

https://github.com/zenn-dev/zenn-editor/issues

### 折りたたみ

::::details 1

:::details 2
Expand All @@ -30,7 +40,7 @@ https://example1.com

::::

# not convert
### リンクのみ

👇 not converted to links

Expand Down Expand Up @@ -63,3 +73,7 @@ https://example1.com
- https://example1.com

::::

## 👇html tag cannot be embedded.

<iframe width="560" height="315" src="https://www.youtube.com/embed/ToLJE4YEQRI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allow="fullscreen"></iframe>
38 changes: 38 additions & 0 deletions packages/zenn-cli/articles/301-example-embed-github.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: '埋め込みのテスト(GitHub)'
type: 'tech' # or "idea"
topics: ['embed', 'test']
emoji: 🐲
published: true
---

`<iframe />` を用いて要素を表示する機能の一覧

## GitHub

**短い行数**

https://github.com/zenn-dev/zenn-editor/blob/canary/lerna.json

**長い行数**

https://github.com/zenn-dev/zenn-editor/blob/canary/pnpm-lock.yaml

**行数指定**

https://github.com/zenn-dev/zenn-editor/blob/canary/pnpm-lock.yaml#L4-L14

**開始行のみ指定**

https://github.com/zenn-dev/zenn-editor/blob/canary/pnpm-lock.yaml#L4

## Gists

https://gist.github.com/hofmannsven/9164408
https://gist.github.com/lmars/8be1952a8d03f8a31b17

@[gist](https://gist.github.com/mattpodwysocki/218388)

### specific file

https://gist.github.com/hofmannsven/9164408?file=my.cnf
45 changes: 45 additions & 0 deletions packages/zenn-cli/articles/302-example-embed-x.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: '埋め込みのテスト(X)'
type: 'tech' # or "idea"
topics: ['embed', 'test']
emoji: 🐲
published: true
---

## `@[tweet]` 記法(`twitter.com`

@[tweet](https://twitter.com/jack/status/20)

@[tweet](https://twitter.com/steelydylan/status/1253567029010825216)

## `@[tweet]` 記法(`x.com`

@[tweet](https://x.com/jack/status/20)

@[tweet](https://x.com/steelydylan/status/1253567029010825216)

## URL埋め込み(`twitter.com`

https://twitter.com/jack/status/20

https://twitter.com/steelydylan/status/1253567029010825216

## URL埋め込み(`x.com`

https://x.com/jack/status/20

https://x.com/steelydylan/status/1253567029010825216

## URLパラメーター

### なし

https://twitter.com/jack/status/1364262123417726976

### with `?conversation=none`

https://twitter.com/jack/status/1364262123417726976?conversation=none

### with `&t=hoge`

https://twitter.com/jack/status/1364262123417726976?conversation=none&t=hoge
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'mermaid'
type: 'ida' # or "idea"
title: '埋め込みのテスト(Mermaid)'
type: 'idea' # or "idea"
topics:
- mermaid
emoji: 👩‍💻
Expand Down
Loading

0 comments on commit c419bb4

Please sign in to comment.