Skip to content

Commit 209eca9

Browse files
committed
feat: [plugin]: Added test and demo of plugin
1 parent 2c12782 commit 209eca9

19 files changed

+153
-1
lines changed

Diff for: .gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ __pycache__/
44
.vscode/*
55
.pytest_cache/
66
.tox/
7-
.hypothesis/
7+
.hypothesis/
8+
site
9+
demo/site

Diff for: Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ clean:
2626
rm -rf .tox
2727
rm -rf .hypothesis
2828

29+
plugin_demo:
30+
cd demo
31+
mkdocs serve
32+
2933
.PHONY: tests clean pre_commit

Diff for: demo/docs/img/Maine_coon.jpg

26.8 KB
Loading

Diff for: demo/docs/img/Persialainen.jpg

102 KB
Loading

Diff for: demo/docs/img/Siam_lilacpoint.jpg

632 KB
Loading

Diff for: demo/docs/index.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Cats
2+
3+
## Introduction
4+
5+
Cats are small, carnivorous mammals that are often kept as pets. They are known for their playful behavior, independent nature, and distinctive vocalizations. Here are some interesting facts about cats.
6+
7+
## Breeds
8+
9+
### 1. Persian Cat
10+
11+
Persian cats are known for their long, luxurious fur and distinctive flat face. They are calm and enjoy lounging around the house.
12+
13+
![Persian Cat]@small(./img/Persialainen.jpg)
14+
15+
### 2. Siamese Cat
16+
17+
Siamese cats are known for their striking blue almond-shaped eyes and short coat with color points. They are social and vocal.
18+
19+
![Siamese Cat]@large(./img/Siam_lilacpoint.jpg)
20+
21+
### 3. Maine Coon
22+
23+
Maine Coon cats are one of the largest domestic cat breeds. They have tufted ears, bushy tails, and a thick, water-resistant coat.
24+
25+
![Maine Coon]@small(./img/Maine_coon.jpg)
26+
27+
## Behavior
28+
29+
Cats exhibit various behaviors that make them unique and endearing as pets.
30+
31+
### 1. Purring
32+
33+
Cats purr when content or relaxed, and it is often associated with positive feelings.
34+
35+
### 2. Kneading
36+
37+
Kneading is a behavior where cats push their paws in and out against a soft surface. It's usually a sign of contentment.
38+
39+
### 3. Hunting Instinct
40+
41+
Cats are natural hunters, and even domesticated cats may display hunting behavior, such as stalking and pouncing.
42+
43+
## Health
44+
45+
### 1. Common Health Issues
46+
47+
- **Hairballs:** Cats may develop hairballs from grooming themselves. Regular brushing can help reduce this issue.
48+
49+
- **Dental Problems:** Dental care is crucial for cats. Regular teeth cleaning and dental check-ups are recommended.
50+
51+
- **Obesity:** Overweight cats are prone to various health issues. A balanced diet and regular exercise are essential.
52+
53+
## Conclusion
54+
55+
Cats make wonderful companions, bringing joy and warmth to households worldwide. Understanding their behavior and providing proper care ensures a happy and healthy relationship with these fascinating creatures.

Diff for: demo/mkdocs.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
site_name: Test with cats
2+
3+
dev_addr: 127.0.0.1:8002
4+
5+
theme:
6+
name: "material"
7+
8+
markdown_extensions:
9+
- attr_list
10+
11+
plugins:
12+
- mkdocstrings
13+
- image-formatter:
14+
image_size:
15+
small:
16+
height: 100px
17+
width: 100px
18+
big:
19+
height: 200px
20+
width: 200px
21+
22+
nav:
23+
- Home: index.md

Diff for: mkdocs.yml

+13
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
site_name: Image formatter plugin for MkDocs
22

3+
dev_addr: 127.0.0.1:8002
4+
35
theme:
46
name: "material"
57

8+
markdown_extensions:
9+
- attr_list
10+
611
plugins:
712
- mkdocstrings
13+
- image-formatter:
14+
image_size:
15+
small:
16+
height: 100px
17+
width: 100px
18+
big:
19+
height: 200px
20+
width: 200px
821

922
nav:
1023
- Home: index.md
26.8 KB
Loading
Loading
Loading

Diff for: resources/e2e_test_files/test_project/docs/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
![Persian Cat]@small(./img/Persialainen.jpg)
2+
![Siamese Cat]@big(./img/Siam_lilacpoint.jpg)
3+
![Maine Coon]@small(./img/Maine_coon.jpg)

Diff for: resources/e2e_test_files/test_project/mkdocs.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
site_name: Test with cats
2+
3+
dev_addr: 127.0.0.1:8002
4+
5+
theme:
6+
name: "material"
7+
8+
markdown_extensions:
9+
- attr_list
10+
11+
plugins:
12+
- mkdocstrings
13+
- image-formatter:
14+
image_size:
15+
small:
16+
height: 100px
17+
width: 100px
18+
big:
19+
height: 200px
20+
width: 200px
21+
22+
nav:
23+
- Home: index.md
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
![Persian Cat]@large(./img/Persialainen.jpg)
2+
![Siamese Cat]@big(./img/Siam_lilacpoint.jpg)
3+
![Maine Coon]@test(./img/Maine_coon.jpg)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
site_name: Test with cats
2+
3+
dev_addr: 127.0.0.1:8002
4+
5+
theme:
6+
name: "material"
7+
8+
markdown_extensions:
9+
- attr_list
10+
11+
plugins:
12+
- mkdocstrings
13+
- image-formatter:
14+
image_size:
15+
small:
16+
height: 100px
17+
width: 100px
18+
big:
19+
height: 200px
20+
width: 200px
21+
22+
nav:
23+
- Home: index.md

Diff for: test.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Image formatter plugin
2+
3+
::: image_formatter.image_formatter_plugin.image_formatter_plugin

0 commit comments

Comments
 (0)