Skip to content

Commit cf19133

Browse files
committed
Base blocks generated
1 parent bb3d2f1 commit cf19133

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2486
-0
lines changed

config/md-notion.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,43 @@
33
// config for RedberryProducts/MdNotion
44
return [
55

6+
/**
7+
* The Notion API key used for authentication with the Notion API.
8+
*/
9+
"notion_api_key" => env("NOTION_API_KEY", ""),
10+
11+
/**
12+
* Defines the maximum block number that can be fetched in a single request.
13+
*/
14+
"default_page_size" => env("NOTION_DEFAULT_PAGE_SIZE", 100),
15+
16+
/**
17+
* Block type to adapter class mappings.
18+
* Keys are Notion block types from the JSON response.
19+
* Values are fully qualified adapter class names.
20+
*/
21+
"adapters" => [
22+
"paragraph" => \RedberryProducts\MdNotion\Adapters\ParagraphAdapter::class,
23+
"heading_1" => fn() => new \RedberryProducts\MdNotion\Adapters\HeadingAdapter(1),
24+
"heading_2" => fn() => new \RedberryProducts\MdNotion\Adapters\HeadingAdapter(2),
25+
"heading_3" => fn() => new \RedberryProducts\MdNotion\Adapters\HeadingAdapter(3),
26+
"bulleted_list_item" => \RedberryProducts\MdNotion\Adapters\BulletedListItemAdapter::class,
27+
"numbered_list_item" => \RedberryProducts\MdNotion\Adapters\NumberedListItemAdapter::class,
28+
"to_do" => \RedberryProducts\MdNotion\Adapters\ToDoAdapter::class,
29+
"toggle" => \RedberryProducts\MdNotion\Adapters\ToggleAdapter::class,
30+
"code" => \RedberryProducts\MdNotion\Adapters\CodeAdapter::class,
31+
"quote" => \RedberryProducts\MdNotion\Adapters\QuoteAdapter::class,
32+
"callout" => \RedberryProducts\MdNotion\Adapters\CalloutAdapter::class,
33+
"divider" => \RedberryProducts\MdNotion\Adapters\DividerAdapter::class,
34+
"bookmark" => \RedberryProducts\MdNotion\Adapters\BookmarkAdapter::class,
35+
"image" => \RedberryProducts\MdNotion\Adapters\ImageAdapter::class,
36+
"file" => \RedberryProducts\MdNotion\Adapters\FileAdapter::class,
37+
"video" => \RedberryProducts\MdNotion\Adapters\VideoAdapter::class,
38+
"column_list" => \RedberryProducts\MdNotion\Adapters\ColumnListAdapter::class,
39+
"column" => \RedberryProducts\MdNotion\Adapters\ColumnAdapter::class,
40+
"table" => \RedberryProducts\MdNotion\Adapters\TableAdapter::class,
41+
"table_row" => \RedberryProducts\MdNotion\Adapters\TableRowAdapter::class,
42+
"child_page" => \RedberryProducts\MdNotion\Adapters\ChildPageAdapter::class,
43+
"child_database" => \RedberryProducts\MdNotion\Adapters\ChildDatabaseAdapter::class,
44+
],
645
];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{{ $domain }} @if(!empty($caption)) - {{ $caption }} @else - Bookmark @endif]({{ $url }})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-{{ $content }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
> {{ $icon }}{{ $content }}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```{{ $language }}
2+
{!! $content !!}
3+
```
4+
5+
@if(!empty($caption))
6+
>{{ $caption }}
7+
@endif
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
---
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{ $type === 'external' ? '🔗' : '📎' }} [{{ $name }}]({{ $url }})
2+
3+
@if(!empty($caption))
4+
>{{ $caption }}@endif
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{!! str_repeat('#', $level) !!} {{ $content }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
![{{ $caption }}]({{ $url }})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1. {{ $content }}

0 commit comments

Comments
 (0)