Skip to content

Commit 05d64c2

Browse files
committed
update docs
1 parent 54672c5 commit 05d64c2

File tree

17 files changed

+890
-29
lines changed

17 files changed

+890
-29
lines changed

demo-mkdocs/docs/disable/image.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
You can disable lightbox of images separately by adding ```off-glb``` class through markdown_extensions ```attr_list```. Enable ```attr_list``` via ```mkdocs.yml```:
2+
3+
```yaml
4+
markdown_extensions:
5+
- attr_list
6+
```
7+
8+
Check more detail about ```attr_list``` on the [official document](https://python-markdown.github.io/extensions/attr_list/).
9+
10+
## Demo
11+
12+
The first image's lightbox is disabled.
13+
14+
```markdown
15+
![Lanyu, Taiwan](../images/gallery/blueswen-lanyu.jpeg){ .off-glb }
16+
Lanyu, Taiwan. Credit: Blueswen
17+
18+
![Obertraun, Austria](../images/gallery/blueswen-obertraun.jpeg)
19+
Obertraun, Austria. Credit: Blueswen
20+
```
21+
22+
![Lanyu, Taiwan](../images/gallery/blueswen-lanyu.jpeg){ .off-glb }
23+
Lanyu, Taiwan. Credit: Blueswen
24+
25+
![Obertraun, Austria](../images/gallery/blueswen-obertraun.jpeg)
26+
Obertraun, Austria. Credit: Blueswen

demo-mkdocs/docs/disable/page.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
glightbox: false
3+
---
4+
5+
You can disable lightbox of all images on a specific page by adding page metadata ```glightbox: false``` through markdown_extensions ```meta```. Enable ```meta``` via ```mkdocs.yml```:
6+
7+
```yaml
8+
markdown_extensions:
9+
- meta
10+
```
11+
12+
Check more detail about ```meta``` on the [official document](https://python-markdown.github.io/extensions/meta_data/).
13+
14+
## Demo
15+
16+
All images' lightbox are disabled on this page.
17+
18+
```markdown
19+
---
20+
glightbox: false
21+
---
22+
23+
![Lanyu, Taiwan](../images/gallery/blueswen-lanyu.jpeg)
24+
Lanyu, Taiwan. Credit: Blueswen
25+
26+
![Obertraun, Austria](../images/gallery/blueswen-obertraun.jpeg)
27+
Obertraun, Austria. Credit: Blueswen
28+
```
29+
30+
![Lanyu, Taiwan](../images/gallery/blueswen-lanyu.jpeg)
31+
Lanyu, Taiwan. Credit: Blueswen
32+
33+
![Obertraun, Austria](../images/gallery/blueswen-obertraun.jpeg)
34+
Obertraun, Austria. Credit: Blueswen

demo-mkdocs/docs/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GLightbox is a pure javascript lightbox library with mobile support.
77
## Dependency
88

99
1. Python Package
10-
1. beautifulsoup4==4.11.1
10+
1. beautifulsoup4>=4.11.1
1111
2. GLightbox javascript file and css file
1212
1. GLightbox==3.2.0
1313

@@ -19,7 +19,7 @@ GLightbox is a pure javascript lightbox library with mobile support.
1919
pip install mkdocs-glightbox
2020
```
2121

22-
2. Add ```glightbox``` plugin in to your mkdocs.yml plugins sections:
22+
2. Add ```glightbox``` plugin to your mkdocs.yml plugins sections:
2323

2424
```yaml
2525
plugins:
@@ -52,9 +52,11 @@ GLightbox is a pure javascript lightbox library with mobile support.
5252

5353
Check more options information on [GLightbox Docs](https://github.com/biati-digital/glightbox#lightbox-options).
5454

55+
4. For more flexibility, you can disable lightbox by a [specific image](./disable/image.md) or a [specific page](./disable/page.md).
56+
5557
## Demo
5658

57-
Click image to try lightbox and enjoy the view of Taiwan.
59+
Click the image to try lightbox and enjoy the view of Taiwan.
5860

5961
![Sunset over Taipei City](./images/thomas-tucker-sunset-over-taipei-city.jpg)
6062
Sunset over Taipei City. Credit: [Thomas Tucker](https://unsplash.com/photos/au3CYbd7vCU)

demo-mkdocs/mkdocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ markdown_extensions:
4444
- pymdownx.inlinehilite
4545
- pymdownx.snippets
4646
- pymdownx.superfences
47+
- attr_list
48+
- meta
4749

4850
plugins:
4951
- glightbox
@@ -54,3 +56,6 @@ nav:
5456
- Sea: taiwan/sea.md
5557
- Mountain: taiwan/mountain.md
5658
- Gallery: gallery.md
59+
- More Flexibility:
60+
- Disable by image: disable/image.md
61+
- Disable by page: disable/page.md

docs/404.html

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313

1414
<link rel="icon" href="/blueswen/mkdocs-glightbox/assets/images/favicon.png">
15-
<meta name="generator" content="mkdocs-1.3.0, mkdocs-material-8.3.9+insiders-4.20.1">
15+
<meta name="generator" content="mkdocs-1.3.0, mkdocs-material-8.3.9+insiders-4.21.0">
1616

1717

1818

1919
<title>MkDocs GLightbox</title>
2020

2121

2222

23-
<link rel="stylesheet" href="/blueswen/mkdocs-glightbox/assets/stylesheets/main.19db47b7.min.css">
23+
<link rel="stylesheet" href="/blueswen/mkdocs-glightbox/assets/stylesheets/main.846d444e.min.css">
2424

2525

2626
<link rel="stylesheet" href="/blueswen/mkdocs-glightbox/assets/stylesheets/palette.cbb835fc.min.css">
@@ -82,6 +82,10 @@
8282

8383

8484

85+
86+
87+
88+
8589
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
8690
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
8791
<label class="md-overlay" for="__drawer"></label>
@@ -346,6 +350,87 @@
346350

347351

348352

353+
354+
355+
356+
357+
358+
359+
360+
361+
362+
363+
364+
365+
<li class="md-nav__item md-nav__item--nested">
366+
367+
368+
369+
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" >
370+
371+
372+
<label class="md-nav__link" for="__nav_4">
373+
374+
375+
<span class="md-ellipsis">
376+
More Flexibility
377+
</span>
378+
379+
<span class="md-nav__icon md-icon"></span>
380+
</label>
381+
382+
<nav class="md-nav" aria-label="More Flexibility" data-md-level="1">
383+
<label class="md-nav__title" for="__nav_4">
384+
<span class="md-nav__icon md-icon"></span>
385+
More Flexibility
386+
</label>
387+
<ul class="md-nav__list" data-md-scrollfix>
388+
389+
390+
391+
392+
393+
394+
<li class="md-nav__item">
395+
<a href="/blueswen/mkdocs-glightbox/disable/image/" class="md-nav__link">
396+
397+
398+
<span class="md-ellipsis">
399+
Disable by image
400+
</span>
401+
402+
</a>
403+
</li>
404+
405+
406+
407+
408+
409+
410+
411+
412+
413+
<li class="md-nav__item">
414+
<a href="/blueswen/mkdocs-glightbox/disable/page/" class="md-nav__link">
415+
416+
417+
<span class="md-ellipsis">
418+
Disable by page
419+
</span>
420+
421+
</a>
422+
</li>
423+
424+
425+
426+
427+
</ul>
428+
</nav>
429+
430+
</li>
431+
432+
433+
349434
</ul>
350435
</nav>
351436
</div>
@@ -393,7 +478,7 @@ <h1>404 - Not found</h1>
393478
<script id="__config" type="application/json">{"base": "/blueswen/mkdocs-glightbox/", "features": ["toc.integrate"], "search": "/blueswen/mkdocs-glightbox/assets/javascripts/workers/search.720157f5.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.config.lang": "en", "search.config.pipeline": "stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version.title": "Select version"}}</script>
394479

395480

396-
<script src="/blueswen/mkdocs-glightbox/assets/javascripts/bundle.5e3df397.min.js"></script>
481+
<script src="/blueswen/mkdocs-glightbox/assets/javascripts/bundle.15234abc.min.js"></script>
397482

398483

399484
</body>

docs/assets/javascripts/bundle.15234abc.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/javascripts/bundle.5e3df397.min.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/assets/stylesheets/main.19db47b7.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/assets/stylesheets/main.846d444e.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)