snowboard icon indicating copy to clipboard operation
snowboard copied to clipboard

Output html should use relative paths

Open stevebaxter opened this issue 4 years ago • 1 comments

The output HTML uses absolute paths, for instance if the snowboard command line is:

snowboard html --output dist/help myapi.apib

The output is:

  <body class="has-navbar-fixed-top">
    <div id="root"></div>
    <script src="/help/index.js"></script>
  </body>

The problem is that the documentation may not be served at /help (in our case it will be served at /1.0/help). It might be better to use relative paths here (e.g. <script src="index.js"></script>, or allow the user to specify the root folder.

stevebaxter avatar Jul 30 '20 12:07 stevebaxter

Yes indeed, also ran into this issue today. Not sure how to fix it right now, except for changing the html manually.

roelandwyns avatar Jul 30 '20 14:07 roelandwyns