Giter Site home page Giter Site logo

Comments (7)

wooorm avatar wooorm commented on June 18, 2024

This project is more for Git repositories, such as this one, hosted on GitHub/Gitlab/Bitbucket.
I do not know Foliant but I’m guessing it’s very different and that supporting it is essentially a fork of this project?

It might be of interest to note that you can already somewhat integrate with this project: https://github.com/remarkjs/remark-validate-links#integration.

from remark-validate-links.

holamgadol avatar holamgadol commented on June 18, 2024

@wooorm Foliant projects are also Git repositories. These projects can be considered as a special case of MkDocs SSG repo. So these features can be used not only for Foliant, but for SSG projects.

from remark-validate-links.

wooorm avatar wooorm commented on June 18, 2024

Please explain what isn’t working for them, then. Because apparently they have custom links.

Note: the “hosted on GitHub/Gitlab/Bitbucket” part I listed is important. This project is not for any random website or whatever maintained on a file system, but for projects that have markdown which is rendered on GitHub/Gitlab/Bitbucket

from remark-validate-links.

holamgadol avatar holamgadol commented on June 18, 2024

Proposed features:

  • extract multiple refs from headings with custom ID
    #Long Heading {#shortref} should produce long-heading and shortref
  • treat local links according to the MkDocs directory structure
    ../../document-folder/document/#anchor should produce ../document-folder/document.md#anchor
  • treat links like ./#heading as a link to an anchor heading
  • option to turn off lowercase in hash
    hash = url.slice(numberSignIndex)

Foliant projects are hosted on GitHub/Gitlab/Bitbucket, but rendered by another tools as static web site

from remark-validate-links.

wooorm avatar wooorm commented on June 18, 2024
  1. should be done with a plugin to add support for that custom syntax so that remark understands it
  2. you can have a plugin that rewrites URLs matching Foliant, however, I believe this is outside of the scope of this project, because this project matches how markdown files on GitHub/Gitlab/Bitbucket link to each other, and not how particular static-site generators do their work. There is a lot of logic in this project that you don’t need. A separate project that say, checks the result of any static-site generator and works on rehype instead of remark, would be more useful to you
  3. I believe that works
  4. I do not understand this one

but rendered by another tools as static web site

With “hosted”, I mean that links in markdown files here, which point to other markdown files here, match according to how GitHub/Gitlab/Bitbucket do that. So in your parlance, I mean whether links will work assuming the markdown is rendered on GitHub/Gitlab/Bitbucket.

That is to contrast it with Foliant’s behavior that you describe, for things such as ../../document-folder/document/#anchor. Those do not work on GitHub/Gitlab/Bitbucket.

from remark-validate-links.

holamgadol avatar holamgadol commented on June 18, 2024

@wooorm thank you the response. I helped me to understand my requirements better.
I'll check the possibility of a separate project for linting local links in Foliant projects

  1. I do not understand this one

MkDocs preserve letter case in anchors, so I needed an option to turn the lowercase off

from remark-validate-links.

wooorm avatar wooorm commented on June 18, 2024

Cool :) Good luck!

from remark-validate-links.

Related Issues (20)

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.