Plugin documentation links

68 views
Skip to first unread message

Yuxuan Wang

unread,
Aug 22, 2016, 11:10:12 PM8/22/16
to repo-discuss
Currently we use markdown in plugin documentation links.

Gerrit has a simple markdown render to host them, and we also have
gitiles which has a builtin markdown render to host them.

The render in gerrit can handle both ".html" and ".md" extensions, as
a result in most of the plugin docs we link to "foo.md" file by using
"foo.html". But this is broken in gitiles.

So I made a series of changes to try to unbreak gitiles.
https://gerrit-review.googlesource.com/#/c/83950/ tries to not change
".md" into ".html" when we generate index.html on-the-fly, and the
following changes changed the link in plugins:

- admin-console: https://gerrit-review.googlesource.com/#/c/83893/
- download-commands: https://gerrit-review.googlesource.com/#/c/84010/
- evict-cache: https://gerrit-review.googlesource.com/#/c/83951/
- imagare: https://gerrit-review.googlesource.com/#/c/83952/
- importer: https://gerrit-review.googlesource.com/#/c/83953/
- its-base: https://gerrit-review.googlesource.com/#/c/83934/
- its-bugzilla: https://gerrit-review.googlesource.com/#/c/83894/
- its-storyboard: https://gerrit-review.googlesource.com/#/c/83895/
- javamelody: https://gerrit-review.googlesource.com/#/c/83954/
- manifest-subscription: https://gerrit-review.googlesource.com/#/c/84011/
- replication: https://gerrit-review.googlesource.com/#/c/84012/
- reviewers: https://gerrit-review.googlesource.com/#/c/84013/
- reviewers-by-blame: https://gerrit-review.googlesource.com/#/c/83935/
- reviewnotes: https://gerrit-review.googlesource.com/#/c/83955/
- serviceuser: https://gerrit-review.googlesource.com/#/c/83896/
- sync-events: https://gerrit-review.googlesource.com/#/c/83897/
- sync-index: https://gerrit-review.googlesource.com/#/c/83936/
- verify-status: https://gerrit-review.googlesource.com/#/c/83937/
- x-docs: https://gerrit-review.googlesource.com/#/c/84014/

After these changes are merged. I'm also considering make a change to
remove the auto ".md" -> ".html" handling in gerrit's markdown render
to avoid plugin developers from accidentally breaking gitiles by
accident in the future.

--
ʎɥsıɟ

Yuxuan Wang

unread,
Aug 22, 2016, 11:55:25 PM8/22/16
to repo-discuss
Also, these are only the plugins that I can read (plus helloworld
which is read-only). If you are the owner of a non-public-readable
plugin, please fix it yourself.

--
ʎɥsıɟ

David Pursehouse

unread,
Aug 23, 2016, 1:37:17 AM8/23/16
to Yuxuan Wang, repo-discuss
Is it expected that Gitiles on gerrit.googlesource.com doesn't convert the markdown links to HTML <a> tags?

See for example [1] which is the new about.md in the download-commands plugin.  The link to config.md is shown as raw markdown instead of being a link.



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yuxuan Wang

unread,
Aug 23, 2016, 1:02:47 PM8/23/16
to David Pursehouse, repo-discuss
That's because of the \n inside the link:
[configuration]\n(config.md#download.scheme). The Markdown parser
gitiles uses is more strict and doesn't like this, the Markdown parser
gerrit uses doesn't mind.

https://gerrit-review.googlesource.com/84015 will fix this:

https://gerrit.googlesource.com/plugins/download-commands/+/3fb4fb63317b6004761d1fea98a8f4d288d95409/src/main/resources/Documentation/about.md
--
ʎɥsıɟ
Reply all
Reply to author
Forward
0 new messages