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

[Documentation] Adds Sphnix-copy-button & sphnix-tabs to docs #13239

Merged
merged 4 commits into from
Sep 24, 2020

Conversation

davinci26
Copy link
Member

@davinci26 davinci26 commented Sep 23, 2020

Signed-off-by: Sotiris Nanopoulos sonanopo@microsoft.com

Fixes #13213

Major changes:

  1. Code snippets now have a copy button
  2. We add support for tabs in the documentation.

Additional Description:
This is how it looks now.
image

refs:

  1. https://sphinx-copybutton.readthedocs.io/en/latest/
  2. https://github.com/executablebooks/sphinx-tabs

Risk Level: Low
Testing: Manually
Docs Changes: N/A
Release Notes: N/A

Sotiris Nanopoulos added 3 commits September 23, 2020 11:35
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/dependency-watchers: FYI only for changes made to (bazel/repository_locations\.bzl)|(api/bazel/repository_locations\.bzl)|(.*/requirements\.txt).

🐱

Caused by: #13239 was opened by davinci26.

see: more, trace.

@davinci26
Copy link
Member Author

@phlax let me know what you think.

cc: @envoyproxy/windows-dev this should be useful for Windows vs POSIX documentation.

phlax
phlax previously approved these changes Sep 23, 2020
Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks great - i think ssh should be first tho.

Nice one for throwing in copybutton i was looking at that earlier and wondering

It might be easier waiting till #13230 has landed - just in terms of making changes - but im happy to rebase if necessary - defo not a blocker


or
.. code-tab:: console HTTPS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im thinking we probably want ssh first on the basis that most people following these instructions are devs and have a github acc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did it that way because of GitHub. But it makes sense for us to have them the opposite way. I will change that.

@phlax
Copy link
Member

phlax commented Sep 23, 2020

is it easy/possible to disable copybutton for some blocks ?

for the interactive console stuff it makes less sense - brilliant for config tho!

@phlax
Copy link
Member

phlax commented Sep 23, 2020

...interactive console stuff it makes less sense

maybe im wrong about that - ideal would be that you can copy single lines i think (and perhaps link to them) - not sure how plugin works

@davinci26
Copy link
Member Author

is it easy/possible to disable copybutton for some blocks ?

I added the regex for bash so it is actually pretty smart. For example in the Cache Filter it works in the following way:

Snippet:

 $ pwd
envoy/examples/cache
 $ docker-compose build --pull
 $ docker-compose up -d
 $ docker-compose ps

       Name                      Command            State                             Ports
------------------------------------------------------------------------------------------------------------------------
cache_front-envoy_1   /docker-entrypoint.sh /bin ... Up      10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp
cache_service1_1      /bin/sh -c /usr/local/bin/ ... Up      10000/tcp, 8000/tcp
cache_service2_1      /bin/sh -c /usr/local/bin/ ... Up      10000/tcp, 8000/tcp

The pasted output is:

pwd
docker-compose build --pull
docker-compose up -d
docker-compose ps

@phlax
Copy link
Member

phlax commented Sep 23, 2020

yep - thats pretty cool

@davinci26
Copy link
Member Author

re: rebase after #13230, I also dont mind rebasing. It is the same for me.

Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
docs/conf.py Show resolved Hide resolved
@mattklein123 mattklein123 self-assigned this Sep 23, 2020
@davinci26 davinci26 changed the title [Documentation] Adds Sphnix-copy-button && sphnix-tabs [Documentation] Adds Sphnix-copy-button & sphnix-tabs to docs Sep 23, 2020
@phlax
Copy link
Member

phlax commented Sep 24, 2020

@davinci26 not sure why the test failed (ran out of disk space) - i dont think its because of changes in your PR (might be wrong).

either way - its hung the test instance - adding an empty commit would kick the ci and i think kill the dead server instance

@davinci26
Copy link
Member Author

@phlax i think it is a known issue with gcc in the CI #13212

@davinci26
Copy link
Member Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines, to retry CircleCI checks, use /retest-circle.
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #13239 (comment) was created by @davinci26.

see: more, trace.

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, I will just force merge this while we sort out unrelated CI issues.

@mattklein123 mattklein123 merged commit a7471d8 into envoyproxy:master Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Sphinx tab renderer to documentation
3 participants