Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add predefined reference files for compilation #2422

Open
victor-vb opened this issue Aug 3, 2024 · 0 comments
Open

Add predefined reference files for compilation #2422

victor-vb opened this issue Aug 3, 2024 · 0 comments
Labels
C-enhancement Category: Enhancement or feature request

Comments

@victor-vb
Copy link

victor-vb commented Aug 3, 2024

Problem

Hello, I have some scenarios here. Currently, mdbook has certain functions that are great.
For example: {{#include file}}, but I want to use this function to reference some definition links of other files to facilitate the management of some special definition content without having to define a link in a single file each time.
Here is a scenario I use

The following is my src directory structure

.
├── SUMMARY.md
├── chapter_1.md
├── customize
│   └── something.md
└── definds.md

2 directories, 4 files

Now let's focus on the definds.md file first, which defines some links

[something]:./customize/something.md

The something link points to the contents of a customize/something.md file

In the chapter_1.md file, I used the unique include command provided by the mdbook program to include definds.md, and used the content defined in definds.md to act on something

{{#include definds.md}}
# Chapter 1

related to [something][something]

ok, in this case, it will be convenient for me to manage this kind of external definition file in a unified way without adding it to the SUMMARY.md index.

Let's try to run mdbook serve, when I open the website, and navigate to chapter_1, when I bring you something, something bad happens, the link is broken, it tells me that the content link cannot be found

In the book/customize under the compilation directory, I found that the external link defined in definds.md was not recognized and compiled it. Moreover, I found that the link in chapter_1.md was also incorrect.

Proposed Solution

Same feature request
#1802,#2408,#702 ,#830

We hope to support this kind of external link link detection and compile it into an html file in parallel, so that it does not have to be defined in the SUMMARY.md file.

Notes

No response

@victor-vb victor-vb added the C-enhancement Category: Enhancement or feature request label Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

1 participant