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

API endpoint, docs and git endpoint are hardcoded pretty much everywhere #136

Open
pmcq opened this issue Sep 1, 2017 · 5 comments
Open
Labels
Milestone

Comments

@pmcq
Copy link
Contributor

pmcq commented Sep 1, 2017

Since docs are hosted, on-premise deployments will end up viewing docs that show to curl https://api.algorithmia.com instead of the appropriate endpoint

@pmcq pmcq added the bug label Sep 1, 2017
@pmcq
Copy link
Contributor Author

pmcq commented Sep 1, 2017

FWIW looks like the following pages are impacted, some of which use http instead of https so it'd be nice to fix both of those at the same time

_pages/clients/perl.md
_pages/clients/net_c_sharp.md  # References api.algorithmia.com as  a default so not actually impacted
_pages/clients/alexa.md
_pages/clients/curl.md
_pages/clients/php.md
_pages/getting-started.md

@pmcq
Copy link
Contributor Author

pmcq commented Sep 1, 2017

Actually this is way broader than that... there's links e.g. in the scala algorithm developer guide that link to the public website's scala client. Some guides (e.g. python) do link correctly by using {{ site.baseurl }}
https://github.com/algorithmiaio/dev-center/blame/487b51314b7763419d9f763415c456ef085a8463/_pages/algorithm-development/languages/python.md#L41
vs
https://github.com/algorithmiaio/dev-center/blame/290f8c2d00c08b789374b35b25db5d98084e24d7/_pages/algorithm-development/languages/scala.md#L20

Overall the docs refer to:

algorithmia.com
api.algorithmia.com
blog.algorithmia.com
developers.algorithmia.com
docs.algorithmia.com
git.algorithmia.com

@pmcq pmcq changed the title API endpoint is hardcoded pretty much everywhere API endpoint, docs and git endpoint are hardcoded pretty much everywhere Sep 1, 2017
@pmcq
Copy link
Contributor Author

pmcq commented Sep 1, 2017

Suggestion:

  • Change references to developers.algorithmia.com to algorithmia.com/developers equivalent
  • Change all fully qualified links like https://algorithmia.com/developers/clients/scala to be relative links
  • Change algorithmia.com to WEB_SERVER to be templated by the frontend
  • Change git.algorithmia.com to GIT_SERVER to be templated by the frontend
  • Change api.algorithmia.com to API_SERVER to be templated by the frontend
  • Leave blog.algorithmia.com as pointing to public blog, results in broken links from no-internet environments but non-critical
  • Leave docs.algorithmia.com as pointing to public slate docs, results in broken links from no-internet environments, but while it's definitely nice to have it's non-critical for people to have the full API spec since there are guides per algorithm language anyway. If someone is trying to generate a new algorithmia client in a non-internet environment... they might not have a great time, but it's not critical

@stevielkim stevielkim added this to the Dev Center M8 milestone Dec 7, 2017
@peckjon
Copy link
Contributor

peckjon commented Mar 27, 2018

@anowell are WEB_SERVER / GIT_SERVER / API_SERVER already available? If not, can you add before we being hacking on this?

@anowell
Copy link
Contributor

anowell commented Apr 2, 2018

They are not. The web-server implementation is pretty straight forward (see here). For the interest of making links kinda still work during local development without running a web-server locally, I want to propose alternatives to a few of @pmcq's suggestions.

Instead of using WEB_SERVER, GIT_SERVER, and API_SERVER, can we just have the web-server replace:

  • https://algorithmia.com with Const.webServer
  • https://api.algorithmia.com with s"https://${Const.apiServer}"
  • https://git.algorithmia.com with s"https://${Const.gitServer}"

Also, we still need to figure out how to make certain pages not even appear in an enterprise build of the dev-center. For example, all the FAQ around pricing shouldn't exist at all.

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

No branches or pull requests

4 participants