Flattening URL link for my online help

Post here questions and problems related to editing and publishing DITA content.
Sitrakar
Posts: 23
Joined: Tue Jan 24, 2023 5:40 am

Flattening URL link for my online help

Post by Sitrakar »

Hello,
For my online help, I have the structure of my Dita file source like : Pages/topic/file.dita. So, when I create a page the href is href = ../Pages/topic/file.dita. After the webhelp transformation scenario, the link for the page is website.com/Pages/topic/file.url. We use that structure to have a clean representation of our source (dita files) and know where they are if we want to move them.
So my question is, is it possible to keep that structure pages/topic/file.dita but to flatten the url link like : website.com/file.url. We want to get rid of the /Pages/topic in the url of the online Help.
Best regards,
Sitrakar
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Flattening URL link for my online help

Post by chrispitude »

Hi Sitrakar,

This is a characteristic of how the DITA Open Toolkit itself publishes DITA to HTML output. During the transformation, DITA input files are transformed to HTML output files. This behavior is pretty fundamental to how the transformation works.

There is a rewrite rule feature in the DITA-OT to allow the output file structure to be modified, but it has some limitations:
If both of these were implemented, you would be able to flatten the directory structure in the WebHelp output (or make any other arbitrary change you wanted, such as partial or selective flattening, renaming, etc.). These both represent some work and they are not quick fixes, but the resulting functionality would be very useful for WebHelp.
Sitrakar
Posts: 23
Joined: Tue Jan 24, 2023 5:40 am

Re: Flattening URL link for my online help

Post by Sitrakar »

Thanks chrispitude,
I will try it.
Sitrakar
Posts: 23
Joined: Tue Jan 24, 2023 5:40 am

Re: Flattening URL link for my online help

Post by Sitrakar »

I'm using oxygen XML author 24 software with webhelp responsive as a transformation scenario instead of DITA OT. Is the workflow the same for the rewrite rule for oxygen XML?
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Flattening URL link for my online help

Post by chrispitude »

Hi Sitrakar,

What I was trying to say is that you can probably use rewrite rules with WebHelp to do what you want in the future when both of those items have been fixed, bu you can't do it today. Both items need to be fixed first - one in the DITA-OT itself, and one in WebHelp.

- Chris
Sitrakar
Posts: 23
Joined: Tue Jan 24, 2023 5:40 am

Re: Flattening URL link for my online help

Post by Sitrakar »

Thanks chrispitude for all the information.
Post Reply