eddyluten / mkdocs-alias-plugin Goto Github PK
View Code? Open in Web Editor NEWAn MkDocs plugin allowing links to your pages using a custom alias
License: MIT License
An MkDocs plugin allowing links to your pages using a custom alias
License: MIT License
I use your plugin for a project documentation and I really enjoy it!
I recently encountered a problem with the alias link, as the url used for replacement is an absolute url.
Indeed my documentation site is hosted on a specific route: https://my_site.net/my_project/documentation/
In this case using an absolute url resulted in a link that points to the wrong destination :
https://my_site.net/my_alias instead of https://my_site.net/my_project/documentation/my_alias
I would like to add an option to make the link relative to the current page to fix this issue.
Hello ๐
First of all congratulations for the great plugin, I find it very useful. But now I'm facing something that maybe wasn't taken into account when the plugin was developed, or maybe I'm doing something wrong. I hope somebody can shed some light over this.
The issue happens when I want to put literally [[ something ]]
, enclosed by double square brackets inside a code block.
Specifically, I want to put a code block with something like:
```shell
[[ ! -d $HOME/myfolder ]] && mkdir $HOME/myfolder
```
which renders just fine in Markdown, but the MKDocs console prints it as a warning because the double square brackets are interpreted as an alias that doesn't exist.
WARNING - Alias ' ! -d $HOME/myfolder ' not found in 'test.md'
I know it can be legit using aliases within code blocks, in fact I use them, but just wondering if there could be a way to force escaping them, so they are not interpreted as an alias. As said, this is not a big deal, as the website renders good, it is just to avoid that WARNING message in the console log.
Great job with the plugin! ๐ช
Thanks and regards.
Thanks for the plugin!
I use obsidian to write markdown. It uses both: "alias:" and for multiple "aliases:".
https://help.obsidian.md/Linking+notes+and+files/Aliases
Maybe others would also rather use "aliases:"?
With the recent release of version 0.8.0 of mkdocs-alias, we started having errors when building our documentation using Python 3.8 (See these CI logs).
It seems that the package's code started using list
for annotating lists of objects instead of using List
from the typing package and that is not supported in Python 3.8.
There are 2 possible solutions:
from __future__ import annotations
at the top of the plugin module.List
from the typing package instead of list
until Python 3.8 is no longer supported.hello.
whenever I use the word "context" (upper or lowercase) in an alias definition under the frontmatter YAML of an mkdocs.yml file, the build process fails with the following error:
meta_data['alias']['text']
~~~~~~~~~~~~~~~~~~^^^^^^^^
I'm using Python 3.11, mkdocs 1.5.3 with mkdocs-material 9.4.1
thanks!
Jorge
Enable CI for all version of Python that MkDocs targets, which currently seems to be 3.8: pyproject.toml.
It would be nice to have a tie-in VS Code extension that added first-class support for aliases in Markdown files. I'm capturing some of the requirements here before starting development on it.
Aliases are rendered strangely within VS Code:
Rendering these aliases closer to links would be preferable:
Also perhaps displaying red squigglies if the alias wasn't found within the scope of the project.
While typing the [[
alias syntax, it would be nice to have an auto-complete dialog show with known aliases and their associated page titles.
It would be nice to have a way to easily define an alias for any active Markdown file, including inserting a meta-section into the file if none exists.
hello!
been using the plugin and it works great, however when I use anchors within the aliases, the rendered title is always for the main page and not for the anchor itself. is it possible to render the anchor title instead?
thank you!
Jorge
If I create an alias for a page, is there a way to cross-reference a page anchor using an alias?
For e.g.,
test.md
Refer to the [[devguide-page-ref|developer guide]]#install-section for more details
devguide.md
alias: devguide-page-ref
Yada Yada Yada
Yada Yada Yada
Yada Yada Yada
I tried via [[devguide-page-ref|developer guide]]#install-section
as well as [[devguide-page-ref#install-section|developer guide]]
But the generated link is incorrect.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.