Comments (7)
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.
@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.
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.
Proposed features:
- extract multiple refs from headings with custom ID
#Long Heading {#shortref}
should producelong-heading
andshortref
- 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 anchorheading
- 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.
- should be done with a plugin to add support for that custom syntax so that remark understands it
- 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
- I believe that works
- 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.
@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
- 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.
Cool :) Good luck!
from remark-validate-links.
Related Issues (20)
- External links always report as failures HOT 10
- How to pass `urlConfig` HOT 10
- Fails on projects not versioned with Git HOT 6
- Support linking to anchors in directories HOT 15
- Error when using with Bazel HOT 4
- No warning or error in case of missing reference HOT 3
- Link checker fails on a matching substring HOT 6
- Multiple hyphens in a row are not collapsed in headings HOT 4
- Support Root-Relative Links (Absolute Links)? HOT 8
- Emoji headings are not supported HOT 1
- Images in headings not slugged correctly HOT 6
- Links are failing when the link is using any of the restricted names like "constructor"/"concat" etc. HOT 2
- `missing-heading-in-file` after upgrade to latest `remark-cli` (v10) HOT 9
- Links checks are failing when the header contains any special character in it. HOT 1
- Support [[wikilinks]] HOT 5
- Headings with inline comments are slugged incorrectly HOT 5
- Nonexistent reference-style links don't cause an error HOT 3
- Does not catch bad links that use absolute paths to repo root HOT 5
- Allow selection between warning, error and ignoring regarding the validity of links HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remark-validate-links.