You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-11Lines changed: 36 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,11 @@ Pexels Banner is a plugin for Obsidian that allows you to automatically add beau
6
6
7
7
- Automatically fetch and display banner images from Pexels based on keywords
8
8
- Use direct URLs for custom images
9
+
- Use local images from your vault
10
+
- Use Obsidian internal links to images
9
11
- Customize image size and orientation
10
12
- Set default keywords for when no specific keyword is provided
13
+
- Adjust vertical position of the banner image globally or per note
11
14
- Seamless integration with Obsidian's interface
12
15
13
16
## Installation
@@ -21,19 +24,38 @@ Pexels Banner is a plugin for Obsidian that allows you to automatically add beau
21
24
22
25
1. Obtain a free API key from [Pexels](https://www.pexels.com/api/)
23
26
2. In Obsidian, go to Settings > Pexels Banner and enter your API key
24
-
3. In any note, add a `pexels-banner` field to the frontmatter with keywords for the desired image or a direct URL:
25
-
```yaml
26
-
---
27
-
pexels-banner: blue turtle
28
-
---
27
+
3. In any note, add a `pexels-banner` field to the frontmatter with keywords for the desired image, a direct URL, a path to a local image, or an Obsidian internal link:
29
28
30
-
# Or use a direct URL:
29
+
```yaml
30
+
---
31
+
pexels-banner: blue turtle
32
+
---
31
33
32
-
---
33
-
pexels-banner: https://example.com/image.jpg
34
-
---
35
-
```
36
-
4. The plugin will automatically fetch and display a relevant banner image at the top of your note
34
+
# Or use a direct URL:
35
+
36
+
---
37
+
pexels-banner: https://example.com/image.jpg
38
+
---
39
+
40
+
# Or use a local image:
41
+
42
+
---
43
+
pexels-banner: /path/to/local/image.jpg
44
+
---
45
+
46
+
# Or use an Obsidian internal link:
47
+
48
+
---
49
+
pexels-banner: [[path/to/internal/image.jpg]]
50
+
---
51
+
52
+
# Specify a custom y-position for the image (0-100):
53
+
54
+
---
55
+
pexels-banner: nature
56
+
pexels-banner-y-position: 30
57
+
---
58
+
```
37
59
38
60
## Configuration
39
61
@@ -43,6 +65,9 @@ In the plugin settings, you can customize:
43
65
- Image orientation (landscape, portrait, square)
44
66
- Number of images to fetch (1-50)
45
67
- Default keywords for when no specific keyword is provided
68
+
- Global y-position of the banner image (0-100)
69
+
70
+
The global y-position can be overridden on a per-note basis using the `pexels-banner-y-position` frontmatter field.
instructionsEl.createEl('p',{text: 'Add a "pexels-banner" field to your note\'s frontmatter with keywords for the image you want, or a direct URL to an image.'});
441
+
instructionsEl.createEl('p',{text: 'Add a "pexels-banner" field to your note\'s frontmatter with keywords for the image you want, or a direct URL to an image. You can also specify a custom y-position for the image.'});
0 commit comments