Skip to content

Links and images are not relative to the Markdown file but to config file #121

@unknown321

Description

@unknown321
$ head -n 10 test.book 
author: Your name
title: Your title
output.epub: book.epub
#resources.base_path.images: 
+ ./icons/index.md
+ ./changelog.md
....

$ /tmp/crowbook -n test.book 
🐦 CROWBOOK 📚 0.17.0
[WARN] en.resources.no_match
[ERROR] Error rendering epub: ./icons/index.md: Could not find file './../browse/thumbs/advanced-analytics-on-big-data.png' for image

$ grep advanced-analytics-on-big-data.png icons/index.md 
![Example architecture diagram showing multiple services connected together with numbered steps.](../browse/thumbs/advanced-analytics-on-big-data.png)

$ tree 
. 
├── icons
│   └── index.md
├── _images
│   └── rss-icon.png
├── browse
│   └── thumbs
│       └── advanced-analytics-on-big-data.png
└── test.book

All resources are addressed relatively to source files, however they are searched relatively to configuration file.

According to help:

resources.base_path
  type: path (default: not set)
  Path where to find resources (in the source tree). By default, links and
  images are relative to the Markdown file. If this is set, it will be to this
  path.

My resources are scattered all over the sources, setting resources.base_path to ./icons breaks other files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions