-
Notifications
You must be signed in to change notification settings - Fork 61
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
Show Varnish configuration in tabs #131
Conversation
@@ -29,7 +29,8 @@ | |||
"guzzle/plugin-mock": "*", | |||
"mockery/mockery": "*", | |||
"monolog/monolog": "*", | |||
"symfony/process": "~2.3" | |||
"symfony/process": "~2.3", | |||
"fabpot/sphinx-php": "~1.0.6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either this or we ask devs to run pip install -r requirements
. The requirements.txt
we need anyway for building on ReadTheDocs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets go for "pip install". not everybody fixing a bug will want to build the doc i think.
great! i guess we can steal the css (and js?) snippet from the symfony docs page. |
0cbf292
to
434372a
Compare
Ok, this is now ready. Have a look at the URL above and merge if everything is fine. |
At the Symfony documentation repository, we noticed that the Ruby highlighting doesn't fit the Varnish syntax well enough. Especially comments don't render as expected. Have a look at symfony/symfony-docs#4418 for what to change to use it instead. |
@@ -39,6 +39,7 @@ before_script: | |||
|
|||
script: | |||
- phpunit --coverage-clover=coverage.clover | |||
- sudo pip install -r doc/requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be part of the installation steps, not of the testing steps
I suggest putting the Varnish 4 tab first, and the Varnish 3 tab last. This way, the tab visible by default will be the config for the current Varnish version, not for the older one |
@xabbuh Thanks, switched to CLexer. |
@@ -88,7 +93,7 @@ | |||
|
|||
# The theme to use for HTML and HTML Help pages. See the documentation for | |||
# a list of builtin themes. | |||
html_theme = 'default' | |||
# html_theme = 'default' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what effect does commenting this out have ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dbu see the new config added on line 15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, it might be better to add it here rather than on line 15, to keep it near the comment explaining it
@stof Switched to Varnish 4 first. |
|
||
Varnish 4 | ||
""""""""" | ||
.. literalinclude:: ../tests/Functional/Fixtures/varnish-4/user_context.vcl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems the only vcl file starting with vcl 4.0;
- this seemed not needed anywhere else. should we add it or remove it everywhere?
(the things you start notice when you can compare the config in tabs :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other user_context*.vcl
s have it too. It’s because they are being used directly in the functional tests. In the other functional tests, fos.vcl
is used (which has vcl 4.0
again), but then any other files are included, so they don’t require the header. I don’t think adding vcl 4.0
everywhere would make sense.
Add sphinx-php to pip requirements for building on RTD Rename ‘Testing the Library’ to ‘Contributing’ Add JS and CS for tabs * Make syntax highlighting resemble that of Symfony docs more. Remove fabpot/sphinx-php from require-dev * Now in requirements.txt Improve styling Add pip install to Travis Try to fix static path on RTD Run pip install as sudo on Travis Make border none important Revert path to static Move pip install to install steps Clean up tabs.js Remove sys.path.insert Switch from RubyLexer to CLexer Add link to Sphinx installation Remove duplicated html_theme Show Varnish 4 first
@dbu As explained above, we need the |
awesome! |
Show Varnish configuration in tabs
Fix #130.
Thanks to @xabbuh we can now show config for different Varnish versions in configuration blocks: http://foshttpcache.readthedocs.org/en/doc-tabs/varnish-configuration.html#purge. I guess we need some custom CSS or Sphinx theme to actually render the
<li>
s as tabs.