Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow port to be set in the asset tags for theme previews. #295

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TruRooms
Copy link

✌️

/cc @zendesk/vegemite

Description

While setting a non standard port, scripts for the template were still getting injected with the standard port. Updated to respect the :port option when it is set using the standard options set and inject the appropriate script/style tags into the doc head.

Tasks

  • [ x] Include comments/inline docs where appropriate
  • [ x] Write tests

References

Risks

  • [medium] Does it work on windows? Unable to verify
  • [low] Does it work in the different products (Support, Chat)? Only for the form preview
  • [low] Are there any performance implications? Optional port change should not effect performance.
  • [medium] Any security risks? Allowing script tag to follow the port set from the CLI.
  • [low] What features does this touch? The template live preview server.

@augustocravosilva
Copy link
Member

Thanks for the PR!

Looks like there's still 2 hardcoded references to port '4567', would you be able to update that too?

"http://localhost:4567/guide/#{path_parts.join('/')}"

server.use Rack::LiveReload, live_reload_port: 4567 if options[:livereload]

@Romuloux
Copy link

@augustocravosilva Good catch, references have been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants