Giter Club home page Giter Club logo

docs-debug's Introduction

docs-debug

Temporary repo to debug stuff here: squidfunk/mkdocs-material#2592

steps to reproduce

git clone https://github.com/meleu/docs-debug
cd docs-debug/
docker container run --rm -v ${PWD}:/docs squidfunk/mkdocs-material build

Now, inside the site/ dir, every index.html file that is inside a subdirectory, when they have a link to another pages, they are not linked to ../Another-Page. Instead, they are linked to Current-Page/Another-Page.

A detailed example is described below.

nav: section

In the mkdocs.yml file, we have a nav like this:

nav:
  - General:
    - index.md
    - RetroAchievements Manifesto: RetroAchievements-Manifesto.md
  - Portugues:
    - Introdução: Home-pt_BR.md
    - Geral:
      - Manifesto RetroAchievements: RetroAchievements-Manifesto-pt_BR.md

.md file

In docs.wiki/Home-pt_BR.md there's a line with this link:

[Manifesto RetroAchievements](RetroAchievements-Manifesto-pt_BR)

building the site

I've built the site with this command:

docker container run --rm -v ${PWD}:/docs squidfunk/mkdocs-material build

the generated HTML file

In the generated Home-pt_BR/index.html the generated link is:

<a href="RetroAchievements-Manifesto-pt_BR">Manifesto RetroAchievements</a>

As you can see, the href points to RetroAchievements-Manifesto-pt_BR, and as we're in the Home-pt_BR dir, the link actually goes to Home-pt_BR/RetroAchievements-Manifesto-pt_BR

how it was before

In an old installation of mkdocs-material, it converted that same link in that .md file like this:

<a href="../RetroAchievements-Manifesto-pt_BR">Manifesto RetroAchievements</a>

(the file can be seen here: https://github.com/RetroAchievements/docs/blob/gh-pages/Home-pt_BR/index.html#L2348)

As you can see, the link automatically came prefixed with the ../.

docs-debug's People

Contributors

meleu avatar

Watchers

 avatar  avatar

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.