[WIP] Migrate HTML to RST#4536
Conversation
|
@joel-hamill |
WIP Add _build to gitignore remove build dir WIP
f290a73 to
dd929b5
Compare
| introduction | ||
| quickstart | ||
| uses | ||
| documentation/index No newline at end of file |
There was a problem hiding this comment.
@ewencp agreed. here's my idea: remove the 2nd Introduction, since it is a duplicate. and then won't the TOC actually look like:
HOME
INTRODUCTION
QUICKSTART
USE CASES
DOCUMENTATION
- Kafka APIs
- Configuration
- Design
- Implementation
- Operations
- Security
- Kafka Connect
- Kafka Streams
PERFORMANCE
POWERED BY
PROJECT INFO
ECOSYSTEM
CLIENTS
EVENTS
CONTACT US
APACHE
There was a problem hiding this comment.
Currently the Intro is just a quick link into the documentation section. I'm +1 for removing the second introduction link.
| ============= | ||
|
|
||
| .. contents:: | ||
| :local: |
There was a problem hiding this comment.
Do we want to limit these local TOCs? At current depth this sometimes pushes the first content below the fold for many laptop users and I'm not sure how much value we get past the first level now that these are broken up topically.
There was a problem hiding this comment.
@ewencp i don't think we should, unless the AK site will support left-hand TOC expansion (like CP docs). is that going to happen?
There was a problem hiding this comment.
I was avoiding doing the left-hand TOC expansion for now since it requires more styling. It's absolutely possible to do though. In this case though, the limits I meant were just to do, e.g., 2 levels. The current version looks like this:
I was just questioning whether, e.g., the individual sections 3 levels deep under, e.g., "Developing a Simple Connector" are that valuable. Another way of putting it is that a section that deep in the page is individually useful, maybe we want to split this up further (which is perhaps related to my other comment about preemptively providing a connect/ directory even if we start out only with index.html).
| ============ | ||
|
|
||
| .. contents:: | ||
| :local: |
There was a problem hiding this comment.
I think we should consider not using local TOC on pages like this. The only real point to this page is to be read linearly anyway and the TOC just gets in the way.
|
@joel-hamill I pushed some build integration and styling stuff to make it work with the rest of the site. Remaining checklist that I'm aware of: Tooling
Content
StylingWorst case, we can live with some styling issues for a time, but we can at least track the issues here:
Some questions for you:
|
f12505e to
3bccf9b
Compare
| </div> | ||
|
|
||
| <div class="section" id="interactive-queries"> | ||
|
|
There was a problem hiding this comment.
Do we still need these html files?
| # The short X.Y version. | ||
| version = '4.0' | ||
| # The full version, including alpha/beta/rc tags. | ||
| release = '4.0.0' |
There was a problem hiding this comment.
Some of the version macros like this are not needed in the AK site.
| ------------------------------------------------------------ | ||
|
|
||
| `Download <https://www.apache.org/dyn/closer.cgi?path=/kafka/%7B%7BfullDotVersion%7D%7D/kafka_%7B%7BscalaVersion%7D%7D-%7B%7BfullDotVersion%7D%7D.tgz>`__ | ||
| the {{fullDotVersion}} release and un-tar it. Note that there are |
There was a problem hiding this comment.
This macros like {{fullDotVersion}} and {{dotVersion}} are only for html. And should be modified in rst.
|
|
||
|
|
||
| `Download <https://www.apache.org/dyn/closer.cgi?path=/kafka/%7B%7BfullDotVersion%7D%7D/kafka_2.11-%7B%7BfullDotVersion%7D%7D.tgz>`__ | ||
| the {{fullDotVersion}} release and un-tar it. |
| # add link prefix per link macro | ||
| if role == 'kafka-file': | ||
| linkPrefix = 'https://github.com/apache/kafka/blob/' + kafka_version + '/' | ||
| elif role == 'cp-javadoc': |
| <dependency> | ||
| <groupId>org.apache.kafka</groupId> | ||
| <artifactId>kafka-clients</artifactId> | ||
| <version>1.0.0-cp1</version> |
There was a problem hiding this comment.
cp1 should be removed.
| return [node], [] | ||
| # add link macros | ||
| app.add_role('kafka-file', makeLink) | ||
| app.add_role('cp-javadoc', makeLink)\ |
| mvn archetype:generate \ | ||
| -DarchetypeGroupId=org.apache.kafka \ | ||
| -DarchetypeArtifactId=streams-quickstart-java \ | ||
| -DarchetypeVersion={{fullDotVersion}} \ |
| consumers), other brokers and tools, using either SSL or SASL. Kafka | ||
| supports the following SASL mechanisms: | ||
|
|
||
| - SASL/GSSAPI (Kerberos) - starting at version 0.9.0.0 |
There was a problem hiding this comment.
We should use macros for version numbers here.
There was a problem hiding this comment.
There was a problem hiding this comment.
I don't think this is correct, these are "starting at version" notes, so an absolute, fixed version is correct here.
| | Group | Artifact | Versi | Description | | ||
| | ID | ID | on | | | ||
| +=========+============+=======+======================================+ | ||
| | ``org.a | ``kafka-st | ``1.0 | (Required) Base library for Kafka | |
There was a problem hiding this comment.
Version numbers be templated with macros.
| copyright = u'2018, Apache Software Foundation' | ||
|
|
||
| # The version info for the project you're documenting, acts as replacement for | ||
| # |version| and |release|, also used in various other places throughout the |
There was a problem hiding this comment.
Yup, we should replace the {{fullVersion}} etc macros with this. Just to keep in mind that in AK we also have other macros so we should also add them here, for example:
major_version_prefix = '0.11'
doc_version = '0110'
There was a problem hiding this comment.
Full set I can find is per https://github.com/apache/kafka/blob/trunk/docs/js/templateData.js#L19-L24. Afaict, these are all addressed. This actually doesn't address the doc_version you mentioned, but updated PR includes this as doc_url_version, which is only currently used for javadocs links. I actually don't see anywhere something like major_version_prefix is used -- if there's a case you're aware of can you point me towards it?
…encies to be version-agnostic
|
@joel-hamill @guozhangwang Made a bunch of updates today to get us closer to functional/committable. Includes lots of sphinx customization to make it more usable for us. Most importantly, have been updating my last comment with the TODO list with stuff I've found along the way: #4536 (comment). I've categorized stuff to help us split up work that can be tackled easily by different folks: tooling stuff is probably either me or somebody else familiar with sphinx (though really any developer); content could be handled by anyone -- @joel-hamill, streams developers, tools devs, etc --; and styling requires some CSS combined with understanding/running the docs build & kafka apache httpd setup. I'm trying to add only things that I'd view as blockers to that list -- the stuff below the fold on that comment is stuff we decided we could follow up on later, even if it's technically a regression (generally just a styling/experience thing) from the current state since we'll be in a more reasonable, sustainable, state. To summarize my view of current state:
|
|
@ewencp re: |
|
@joel-hamill One example is https://github.com/apache/kafka/pull/4536/files#diff-ce1711dfc45980e53ccabbba7ef3ee4bR1160 where we have both the left column and right column wrapped in a way that either makes formatting weird (extra spaces) or breaks the embedded rst directives (the run, but due to the wrapping they generate incorrect links). It seems like the built-in table functionality for rst doesn't handle "large" content well. Like the other customizations I added, we might need to consider an extension to make this more reasonable. Don't know if you have thoughts about good ways to handle tables like these. This is one case where HTML actually seems to shine -- they're not necessarily easy to understand quickly and visually from the html, but they are sane to write & maintain. |


This PR migrates the HTML documentation content to restructuredText.
CC: @ewencp @guozhangwang