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

Absolute path in assets #16

Open
kirillde opened this issue Mar 25, 2024 · 3 comments
Open

Absolute path in assets #16

kirillde opened this issue Mar 25, 2024 · 3 comments

Comments

@kirillde
Copy link

kirillde commented Mar 25, 2024

I have .md file:

# Описание папок в src и проектов в них

В папке **src** находится исходный код микросервисов, модулей и вспомогательных библиотек ... .

![](../_images/structure.png)

## Extras

Папка, cодержащая вспомогательные библиотеки, используемые для поддержки мультиязычности в библиотеках вьювера.

...... - фронтэнд библиотека для сбора локалей и поддержки мультиязычности в библиотеках вьювера.

## Tangl

Содержит библиотеки вьювера.

### Вьювер

- ......  - библиотека вьювера.

and toc.yaml file

title: ....
href: index.yaml;
navigation:
  logo:
    url: '../tangl'
  header:
    leftItems:
      - text: 'Item..'
        type: 'link'
        #url: '../../how-to/'
      - text: 'Item...'
        type: 'link'
        #url: '../../docs/ru/'
items:
  - name: CHANGELOG
    href: CHANGELOG.md
  - name: Разделы
    expanded: true
    items:
      - name: Структура
        href: structure.md

run this command yfm -i ./docs -o ./output

and i have generated object with assets, which has absolute path for images in assets list

{ "data": { "leading": false, "toc": { "title": "Tangl", "href": "index.html", "navigation": { "logo": { "url": "../tangl" }, "header": { "leftItems": [ { "text": "Item..", "type": "link" }, { "text": "Item...", "type": "link" } ] } }, "items": [ { ..... }, { ..... }, { "name": "Разделы", "expanded": true, "items": [ ...... ], "id": "Разделы-2-0.2943391760813012" } ], "base": "...." }, "meta": { "metadata": [], "style": [], "script": [] }, "assets": [ "/home/..../www/work/test/output/.tmp_input/_images/structure.png" ], "headings": [ { "title": "Extras", "href": "#extras", "level": 2 }, { "title": "....", "href": "#...", "level": 2, "items": [ { "title": "Вьювер", "href": "#vyuver", "level": 3 } ] } ], "title": "Описание папок в src и проектов в них", "includes": [], "html": "...." }, "router": { "pathname": "structure.html" } }

In the result paths point to tmp folder which will be deleted after build process which is an unexpected behavior

But... my html generated correctly <img src="../_images/tangl-structure.png" />

@3y3
Copy link
Member

3y3 commented Sep 20, 2024

Looks very buggy.
We will try to reproduce this.

@bongiozzo
Copy link

bongiozzo commented Oct 16, 2024

We will try to reproduce this.

It's reproduced in Debian environment
https://t.me/diplodoc_ru/1866

It seems that assets are collected in transform repo
https://github.com/diplodoc-platform/transform/blob/master/src/transform/md.ts

@bongiozzo
Copy link

bongiozzo added a commit to bongiozzo/transform that referenced this issue Oct 26, 2024
3y3 pushed a commit to diplodoc-platform/transform that referenced this issue Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants