timvink / mkdocs-table-reader-plugin

MkDocs plugin that enables a markdown tag like {{ read_csv('table.csv') }} to directly insert various table formats into a page
https://timvink.github.io/mkdocs-table-reader-plugin/
MIT License
124 stars 20 forks source link

URL Recognition from data source #48

Closed iamstrained closed 1 year ago

iamstrained commented 1 year ago

If you are attempting to feed CSV data to the data table conversion (such as outbound links for public sites/beyond your MKDocs local paths) they do not auto convert using this plugin to viable links.

Would be a nice enhancement to work on the link conversion when parsed as a final value-add or Option set to enable.

timvink commented 1 year ago

Hi @iamstrained,

Could you elaborate a bit? Do you have a small example with the current output and the output/syntax you have in mind?

timvink commented 1 year ago

You can use regular markdown markup.

Consider the following yaml file:

- name: google
  link: https://www.google.com
- name: bing
  link: https://www.bing.com  
- name: another
  link: "[bing](https://www.bing.com)"
- name: and
  link: "<https://www.bing.com>"

That renders as:

image

Also note that normal links in markdown also do not auto-convert to links.

What you are probably looking for is https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/ . Please re-open if I misinterpreted your message :)