Code Monkey home page Code Monkey logo

mkdocs-ezlinked-plugin's Introduction

Hi ๐Ÿ‘‹, I'm Mara-Li

mara-li

Lisandra__S

Languages and Tools:

css3gitpythontypescript

Support:

mara-li



mara-li mara-li

mkdocs-ezlinked-plugin's People

Contributors

actions-user avatar mara-li avatar orbikm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

mkdocs-ezlinked-plugin's Issues

Rename the plugin to give it better visibility

Hello there,

Thanks for this fork that fixes my issues.

I would advise to rename your fork, so the plugin name is different, to give it more visibility. Because it can't be found without help, and it definitely deserves to be visible.

Publishing Obsidian Vault to mkdocs is a game changer to me.

Expecting `[[./a/index]]` to return `<a href="a/"`, get `<a href="a/index"`

With this mkdocs.yml:

site_name: test
plugins:
ย  - ezlinks:
ย  ย  ย  ย  wikilinks: true

And this folder structure:

docs/ 
โ”œโ”€โ”€ index.md 
โ””โ”€โ”€ a/ 
    โ””โ”€โ”€ index.md

After the build we will have:

site/ 
โ”œโ”€โ”€ index.html
โ””โ”€โ”€ a/ 
    โ””โ”€โ”€ index.html

If in docs/index.md you have this content:

[[a/index]]
[[a/index.md]]
[[./a/index]]
[[./a/index.md]]

Then in site/index.html the html will be:

| docs/index.md    | site/index.html                                    | Correct? |
| ---------------- | -------------------------------------------------- | -------- |
| [[a/index]]      | <a href="a/" title="a/index">a/index</a>           | โœ”        |
| [[a/index.md]]   | <a href="a/" title="a/index.md">a/index.md</a>     | โœ”        |
| [[./a/index]]    | <a href="a/index" title="./a/index">./a/index</a>  | โŒ       |
| [[./a/index.md]] | <a href="a/" title="./a/index.md">./a/index.md</a> | โœ”        |

At the same time Mkdocs will notice this:

INFO    -  Doc file 'index.md' contains an
           unrecognized relative link
           'a/index', it was left as is. Did  
           you mean 'a/index.md'?

Do you think all of them should all convert to <a href="./a" or even <a href="./a/index.html"?

Space is erronously added to filename in wikilink syntax

[[Democracy Analysis Project - Links | Links]] 

will look for '../democracy-analysis-project---links-' but was expecting '../democracy-analysis-project---links'.

Should be easy to deal with by trimming spaces before processing.

At the moment this is my workaround

[[Democracy Analysis Project - Links| Links]] 

Incorrect path doesn't stay incorrectly, but automatically is replaced with a different path

Let's say we have this mkdocs.yml:

site_name: test
plugins:
ย  - ezlinks:
ย  ย  ย  ย  wikilinks: true

And this folder structure:

.
โ””โ”€โ”€ docs/
    โ”œโ”€โ”€ a/
    โ”‚   โ”œโ”€โ”€ a1/
    โ”‚   โ”‚   โ””โ”€โ”€ index.md
    โ”‚   โ””โ”€โ”€ index.md
    โ”œโ”€โ”€ b/
    โ”‚   โ””โ”€โ”€ index.md
    โ””โ”€โ”€ index.md

And in docs/a/index.md we have this path: [test](./a1/index.md).

The href output of site/a/index.html is href="a1/", which is correct.

However, if docs/a/a1/index.md doesn't exist, then depending on the case the result varies:

Case href output
Nothing is removed ../b/
docs/b/index.md is removed ../a1/index.md
docs/index.md is removed ../a1/index.md

I expect whatever the case is, the href output should always be ./a1/index.html Do you know why?

`DeprecationWarning` from `warning_filter`

Hello, there is a DeprecationWarning from warning_filter:

https://github.com/Lisandra-dev/mkdocs-ezlinked-plugin/blob/bc3c07c17791f9b72b1c1eac0664abbb779b2393/mkdocs_ezlinks_plugin/plugin.py#L5

INFO    -  DeprecationWarning: warning_filter doesn't do anything since MkDocs 1.2 and will be removed soon. All messages on the `mkdocs` logger get counted automatically.
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/mkdocs_ezlinks_plugin/plugin.py", line 5, in <module>
    from mkdocs.utils import warning_filter
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/mkdocs/utils/__init__.py", line 453, in __getattr__
    warnings.warn(

Related issue: fralau/mkdocs-macros-plugin#173

Environment

mkdocs==1.5.3
mkdocs-material==9.4.5
mkdocs-git-revision-date-localized-plugin==1.2.0
mkdocs-ezlinked-plugin==0.3.3
mkdocs-callouts==1.9.1

Correct MD path with unicode characters doesn't render correct HTML path

Let's say we have this mkdocs.yml:

site_name: test
plugins:
ย  - ezlinks:
ย  ย  ย  ย  wikilinks: true

And this folder structure:

docs/
โ”œโ”€โ”€ index.md
โ””โ”€โ”€ รก.md

And in index.md we have this content:

Path has already been encoded: [./%C3%A1%20.md](./%C3%A1%20.md)
Path isn't encoded: [./รก.md](./รก.md)

The output index.html would be:

Path has already been encoded: <a href="%25C3%25A1%2520.md">./%C3%A1%20.md</a>
Path isn't encoded: <a href="%C3%A1/">./รก.md</a>

If the index.md is renamed to something else, says a.md, then a.html would be:

Path has already been encoded: <a href="%25C3%25A1%2520.md">./%C3%A1%20.md</a>
Path isn't encoded: <a href="../%C3%A1/">./รก.md</a>

The correct case in any case should be <a href="./%C3%A1/">./%C3%A1/.md</a> or at least <a href="รก/">./รก.md</a>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.