How to modify the href attributef of HTML output?

44 views
Skip to first unread message

Alp Bilgin

unread,
Jul 21, 2019, 2:20:50 PM7/21/19
to JSDoc Users
Hello

I am trying to serve the JSDoc output of a project along with some other auto generated documentation websites in a virtual server under http://<INTERNAL_IP>/jsdoc (all formats have their own url segments on the same level).

Out of the box JSDoc generates the following:


    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  </head>

Which looks for documents under http://URL/ instead of http://URL/jsdoc. I looked into the JSDoc source code and saw that this is hardwired in the HTML template. I would rather fix this in doc generation step rather than building a workaround in Apache server. Is there a known plugin or project fork that does this through a configuration?

Thanks in advance,

Alp

Osher El-Netanany

unread,
Jul 25, 2019, 3:26:02 AM7/25/19
to Alp Bilgin, JSDoc Users
I don't see a problem - all paths are expressed as relative paths
 (except for the JS shim which is a complete URL to CDN)

Can you please elaborate on the problem the end user gets?

--
You received this message because you are subscribed to the Google Groups "JSDoc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsdoc-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jsdoc-users/b22189c0-3cac-4ba1-af8a-3dffcc036575%40googlegroups.com.

Alp Bilgin

unread,
Jul 25, 2019, 5:10:11 AM7/25/19
to JSDoc Users

This is the preferred URL for JSDoc page root:

Screenshot_1.png

This is where firefox looks for prettify.js:

Screenshot_2.png


I ended up solving it in the apache server config by hardwiring these fixed URLs to files. But as I said in the original post, I would personally prefer to fix this by passing arguments to the JSDoc executable at compile time, suggestions are still welcome :D.



On Thursday, 25 July 2019 09:26:02 UTC+2, Osher E wrote:
I don't see a problem - all paths are expressed as relative paths
 (except for the JS shim which is a complete URL to CDN)

Can you please elaborate on the problem the end user gets?

On Sun, Jul 21, 2019 at 9:20 PM Alp Bilgin <alp....@trendig.com> wrote:
Hello

I am trying to serve the JSDoc output of a project along with some other auto generated documentation websites in a virtual server under http://<INTERNAL_IP>/jsdoc (all formats have their own url segments on the same level).

Out of the box JSDoc generates the following:


    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  </head>

Which looks for documents under http://URL/ instead of http://URL/jsdoc. I looked into the JSDoc source code and saw that this is hardwired in the HTML template. I would rather fix this in doc generation step rather than building a workaround in Apache server. Is there a known plugin or project fork that does this through a configuration?

Thanks in advance,

Alp

--
You received this message because you are subscribed to the Google Groups "JSDoc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsdoc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages