[
https://issues.apache.org/jira/browse/TINKERPOP-2544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17313929#comment-17313929
]
ASF GitHub Bot commented on TINKERPOP-2544:
-------------------------------------------
OyvindSabo commented on pull request #1412:
URL: https://github.com/apache/tinkerpop/pull/1412#issuecomment-812579241
While running html files locally by opening them as files is very
convenient, there are some limitations to what kinds of files can be opened
this way. The reason the gremlint page can't be viewed if you open it as a file
locally is that the built site consists of an HTML document which imports
JavaScript files (as opposed to having it all inlined in the html document).
When opened as a file locally those imports are considered to be cross-origin
requests by the browser and blocked. It works if you serve the `index.html`
file from a web server, since then all the files will be served from the same
origin.
If you have npm > 5.2.0 you can test the gremlint page by running `npx serve
target/site/home/gremlint`, and the home page, for instance by running `npx
serve target/site/home`.
The error in the published page on https://tinkerpop.apache.org/gremlint/
seems to be different, though. After looking at it for a while I noticed that
the static assets are imported from `https://tinkerpop.apache.org/static/`
instead of `https://tinkerpop.apache.org/gremlint/static/`, where they are
actually located. I'll update the imports to be relative to `index.html` so
that the page works regardless of whether it's hosted at the server root or
not, as described here
https://create-react-app.dev/docs/deployment/#serving-the-same-build-from-different-paths
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Modify site publishing scripts to include gremlint
> --------------------------------------------------
>
> Key: TINKERPOP-2544
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2544
> Project: TinkerPop
> Issue Type: Improvement
> Components: gremlint
> Affects Versions: 3.5.0
> Reporter: Stephen Mallette
> Assignee: Øyvind Sæbø
> Priority: Blocker
>
> I think `bin/generate-home.sh` just needs to run the `npm` command to
> generate the static site and copy it to `target/site/gremlint` and then
> hopefully, `bin/publish-home.sh` will automatically note the new `gremlint`
> directory and upload it svn to publish. If it doesn't, there's probably some
> minor changes to `bin/publish-home.sh` to accomplish that step.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)