sourcegraph/pkg
Quinn Slack c4a9896d90
Remove in-product /help, redirect to docs.sourcegraph.com (#2405)
- Revert e5e1c2393e
- Remove dependency on github.com/sourcegraph/docsite/markdown, revert to using previously used Markdown packages
  - Fix #2369
  - Help with #1361
- Remove in-product rendered /help pages, redirect to equivalent https://docs.sourcegraph.com page for the current product version instead
  - Close #2337
  - Fix #1720
  - Fix #1912 
  - Close #1885
  - Remove dependency on github.com/sourcegraph/docsite

## Notes

### No docs for untagged releases

To redirect `/help/PATH` in-product to https://docs.sourcegraph.com/@v1.2.3/PATH, a Sourcegraph instance needs to know the `v1.2.3` (Git revspec for its current version). This is easy for true releases and release candidates, since for them `"v" + version.Version()` is a valid Git revspec. We special-case dev builds (`version.Version() == "dev"`) and Sourcegraph.com. 

However, if you are running Sourcegraph with a version string that is NOT a valid Git tag (revspec) on the remote, there is no way for the instance to perform the proper redirect. It's also not really feasible for the instance to detect this case and report it (the user would just be redirected to a 404ing https://docs.sourcegraph.com/@some-invalid-version/PATH URL).

I think this is acceptable because I am unaware of why such an untagged build would exist where the doc links would need to work. If we need to give a customer a hotpatch, we should just release a patch version normally. (In extreme, unforeseeable circumstances where we would release an untagged build, having doc links not working is probably low down on the list of concerns because something else must be extremely urgent.)

## Test plan

- [x] Ensure behavior is correct on Sourcegraph.com (should link to version-less docs.sourcegraph.com URL).
- [x] Investigate whether the `version.Version()` string always corresponds to a valid Git tag in all the cases that matter (releases, release candidates, hotfix versions for customers, etc.?). (See "No docs for untagged releases above" for the answer to this.)
- [x] Make our React app handle `/help/PATH` redirects (currently these are only handled by Go, so react-router `<Link>`s to `/help/PATH` don't redirect). (This has a slight bug with the back button in dev mode only that will be addressed by adding docsite on http://localhost:5080 to Procfile, mentioned below as being planned for a future PR.)
- [x] Test that search results are syntax-highlighted correctly.
- [x] Test that Markdown is rendered correctly for `.md` files, code discussions, and saved search emails (or confirm that we have automated tests for these).
2019-03-03 06:33:44 +08:00
..
actor all: More package documentation. 2018-11-08 13:22:52 +02:00
api Enable basic-code-intel by default (#2028) 2019-01-30 17:48:41 -08:00
atomicvalue all: More package documentation. 2018-11-08 13:22:52 +02:00
buildkite ci: Specify commands as a list 2018-11-30 10:26:03 +02:00
conf remove unused/deprecated site config options (#2171) 2019-02-06 00:21:46 -08:00
db Depend on upstream migrate library again (#2118) 2019-02-01 18:44:05 +01:00
debugserver Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
diskcache Symbols sqlite: attempt 2 (#2418) 2019-02-22 15:23:57 -08:00
endpoint improve whitespace handling in space-separated env var lists (#1787) 2019-01-10 17:51:43 -07:00
env all: Remove env.Version (#2160) 2019-02-08 10:54:00 +02:00
errcode fix: nil pointer exception in NewPresentationError(m).Error() 2018-10-01 11:07:13 -07:00
eventlogger all: Remove env.Version (#2160) 2019-02-08 10:54:00 +02:00
extsvc GitLab: add sudo auth provider (#2236) 2019-02-19 21:01:21 -08:00
gitserver repo-updater: Fix error log spamming (#1911) 2019-01-16 11:35:14 +01:00
gituri refactor: rename Go type api.{RepoURI => RepoName} 2018-11-04 01:46:05 -08:00
gosrc all: gofmt -s -w . (#1546) 2018-12-21 16:46:28 +01:00
highlight feat: add GenericSearchResult interface, and re-implement commit and diff search using it (#998) 2018-12-07 10:50:22 -08:00
honey Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
httptestutil Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
httputil Use gregjones/httpcache instead of our old fork (#2410) 2019-02-25 21:50:31 +02:00
hubspot feat: sync last active on update check (#2256) 2019-02-12 08:39:14 -08:00
inventory all: gofmt -s -w . (#1546) 2018-12-21 16:46:28 +01:00
jsonc Rework settings checks (#1891) 2019-01-14 16:47:47 -08:00
legacyconf pkg/legacyconf: remove unused code 2018-12-13 12:41:51 -08:00
metrics move cmd/repo-updater/internal/externalservice/gitlab package into external package 2018-11-02 12:13:49 -07:00
mutablelimiter Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
pathmatch Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
phabricator chore: remove skipped test (#270) 2018-10-04 16:24:38 -07:00
prefixsuffixsaver Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
processrestart Language support via Sourcegraph extensions (#584) 2018-12-07 14:14:13 -08:00
pubsub/pubsubutil send update checks to pubsub topic (#1635) 2019-01-04 12:21:14 -08:00
randstring many individual gorenames of "repo uri" to "repo name" 2018-11-04 01:46:05 -08:00
ratelimit don't subtract 150 from rate limit remaining (#495) 2018-10-23 15:17:06 -07:00
rcache Use new canonical path of "gopkg.in/redsync.v1" 2018-12-12 20:26:17 +01:00
redispool Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
registry Language support via Sourcegraph extensions (#584) 2018-12-07 14:14:13 -08:00
repotrackutil refactor: rename Go type api.{RepoURI => RepoName} 2018-11-04 01:46:05 -08:00
repoupdater Implement repos.list replacement (#1700) 2019-01-11 15:13:48 +01:00
routevar refactor: rename Go type api.{RepoURI => RepoName} 2018-11-04 01:46:05 -08:00
search pkg/search: Make backend test deterministic (#2469) 2019-03-01 09:46:59 +02:00
slack Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
symbols improve whitespace handling in space-separated env var lists (#1787) 2019-01-10 17:51:43 -07:00
sysreq add docker-specific help message when ulimit is too low (#2225) 2019-02-08 16:07:41 -08:00
testutil Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
trace Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
tracer Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
txemail Remove in-product /help, redirect to docs.sourcegraph.com (#2405) 2019-03-03 06:33:44 +08:00
vcs treat naked RevisionNotFoundError as 404 2019-01-17 10:14:20 -08:00
version Remove in-product /help, redirect to docs.sourcegraph.com (#2405) 2019-03-03 06:33:44 +08:00
vfsutil Language support via Sourcegraph extensions (#584) 2018-12-07 14:14:13 -08:00