Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if md_in_html is enabled, render tile captions using markdown #57

Closed
Tracked by #67
ntno opened this issue Jan 9, 2023 · 9 comments
Closed
Tracked by #67

if md_in_html is enabled, render tile captions using markdown #57

ntno opened this issue Jan 9, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@ntno
Copy link
Owner

ntno commented Jan 9, 2023

Describe the problem you'd like to have solved

I would like to be able to enter markdown for a tile caption and have it be rendered in the final tile grid

Describe the ideal solution

if the tile.caption is markdown then it should render correctly when md_in_html extension is enabled

ex:
tile.caption: Figure 8, *Misc. Project Notes*, pages 82, 83.
then 'Misc. Project Notes' should be in italics

Alternatives and current work-arounds

current workaround is to use html tags
ex:
tile.caption: Figure 8, <i>Misc. Project Notes</i>, pages 82, 83.

Additional context

Screen Shot 2023-01-09 at 5 59 32 PM
Screen Shot 2023-01-09 at 5 59 16 PM

@ntno ntno added the bug Something isn't working label Jan 9, 2023
@ntno ntno mentioned this issue Jan 17, 2023
10 tasks
@ntno ntno added this to the beta theme release milestone Jan 17, 2023
@ntno
Copy link
Owner Author

ntno commented Jan 17, 2023

@ntno
Copy link
Owner Author

ntno commented Jan 17, 2023

@ntno
Copy link
Owner Author

ntno commented Jan 18, 2023

@ntno
Copy link
Owner Author

ntno commented Jan 18, 2023

@ntno
Copy link
Owner Author

ntno commented Jan 18, 2023

@ntno
Copy link
Owner Author

ntno commented Jan 22, 2023

resolved with version 3.7.0

  • updated requirements to newest version
  • added "md-to-html" in plugins list

tile config

---
grid_css: ntno_img_card_grid
tiles: 
  - caption: 'Figure 8, *Misc. Project Notes*, pages 82, 83.'
    img_src: /img/led-biking-backpack/led-layout-brainstorm.png
    img_title: '' #TODO
    img_alt: '' #TODO
---

mkdocs.yml

markdown_extensions:
  - attr_list
  - meta
  - md_in_html
  - toc:
      permalink: "#"
  
plugins:
  - md-to-html
  - search
  - git-revision-date

requirements.txt

mkdocs
mkdocs-terminal>=3.7

# Python Markdown Extensions
pygments>=2.14
pymdown-extensions>=9.9

# MkDocs Plugins
mkdocs-git-revision-date-plugin
mkdocs-exclude-search

result

Screen Shot 2023-01-21 at 7 51 25 PM

@ntno
Copy link
Owner Author

ntno commented Jan 22, 2023

implemented new plugin which comes pre-installed with the theme. enable by adding md-to-html or terminal/md-to-html in plugins list. if plugin is not available (ie you don't enable the plugin), markup filter will be skipped during tile rendering.

@ntno ntno closed this as completed Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant