stdlib-js / www

Website for stdlib, a standard library for JavaScript and Node.js.
https://stdlib.io
Apache License 2.0
7 stars 8 forks source link

README URLs to package documentation should be relative, rather than absolute #5

Closed kgryte closed 4 years ago

kgryte commented 4 years ago

Checklist

Please ensure the following tasks are completed before filing a bug report.

Description

Description of the issue.

When we generate the HTML fragments, we transform the project links to absolute URLs; e.g.,

https://stdlib.io/docs/api/v0.0.90/@stdlib/array

Preferably, we'd have the ability to generate relative URLs; e.g.,

/docs/api/v0.0.90/@stdlib/array

To support this, instead of a version option which is set during the build process, we'd provide a base option, defining the "base" URL; e.g.,

var opts = {
    'base': '/docs/api/v0.0.90/'
}

Hence, a base URL would supplant the need for a version option. This would also allow providing an absolute URL; e.g.,

var opts = {
    'base': 'https://stdlib.io/docs/api/v0.0.90/'
}

Related Issues

Does this issue have any related issues?

No.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

Demo

If relevant, provide a link to a live demo.

For a live demo of the issue, see

Reproduction

What steps are required to reproduce the unexpected output?

In order to reproduce this bug, do the following:

Expected Results

What are the expected results?

The following results are expected:

N/A

Actual Results

What are the actual results?

The following are the actual results:

N/A

Environments

What environments are affected (e.g., Node v0.4.x, Chrome, IE 11)? If Node.js, include the npm version, operating system, and any other potentially relevant platform information.

The following environments are affected:

Planeshifter commented 4 years ago

The relevant packages have been updated to support a base option instead of version (https://github.com/stdlib-js/stdlib/compare/409778fae194...de5acbb9d938). Also updated the script at https://github.com/stdlib-js/www/compare/47bfcbdf76c4...670748f10060.

kgryte commented 4 years ago

Awesome! Thanks!