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

Blog plugin should raise warning, not error when related link target does not exist #6869

Closed
4 tasks done
alexvoss opened this issue Mar 4, 2024 · 3 comments
Closed
4 tasks done
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open

Comments

@alexvoss
Copy link
Collaborator

alexvoss commented Mar 4, 2024

Context

Building blogs with Insider edition and related links.

Bug description

When building a blog with related links that do not have a valid target (page or anchor), the blog plugin aborts the build with an error. Instead, it should create a warning so that in non-strict mode the build can finish.

Related links

Reproduction

9.5.12+insiders.4.53.0-blog-related-links-should-respect-strictnon-strict.zip

Steps to reproduce

  1. with Insiders, build reproduction project, observe build fail
  2. change the link in the single blog post to a non-existing page instead of non-existing anchor, observe same behaviour

Browser

No response

Before submitting

@squidfunk squidfunk added the needs investigation Issue must be investigated by the maintainers label Mar 4, 2024
@squidfunk
Copy link
Owner

Thanks for reporting. We can investigate whether we can change this to a warning, but I'm not sure if this is easily achievable. Please note that this is currently not a priority and we're considering it an edge case, but we can look into it for sure ☺️

@squidfunk
Copy link
Owner

Fixed in 519170d. Unresolvable links will now just be left as-is and a warning is printed:

INFO    -  Building documentation...
INFO    -  Cleaning site directory
WARNING -  Error reading metadata of post 'blog/posts/test.md' in 'docs':
           Couldn't find anchor 'does-not-exist' in 'index.md'
WARNING -  Error reading metadata of post 'blog/posts/test.md' in 'docs':
           Couldn't find file for link 'foo.md'
INFO    -  Documentation built in 0.15 seconds

@squidfunk squidfunk added change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open and removed needs investigation Issue must be investigated by the maintainers labels Mar 6, 2024
@squidfunk
Copy link
Owner

Released as part of 9.5.13+insiders-4.53.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants