Skip to content

Commit

Permalink
Add CSS so that readthedocs theme uses full width on wide screens (#4480
Browse files Browse the repository at this point in the history
)

Also fixes images on index.md on Commands site
  • Loading branch information
weitzman committed Jul 26, 2020
1 parent 8fd1118 commit 28e33bf
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ Credits
the folks listed at https://github.com/orgs/drush-ops/people.
* Thanks to [JetBrains](https://www.jetbrains.com) for [supporting this project and open source software](https://www.jetbrains.com/buy/opensource/).

![Drush Logo](drush_logo-black.png)
[![PhpStorm Logo](misc/icon_PhpStorm.png)](https://www.jetbrains.com/phpstorm/)
![Drush Logo](img/drush_logo-black.png)
[![PhpStorm Logo](img/icon_PhpStorm.png)](https://www.jetbrains.com/phpstorm/)
2 changes: 1 addition & 1 deletion docs/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Set up and test for a valid Drupal root, either through the --root options, or e

@bootstrap site
------------------------------
Set up a Drupal site directory and the correct environment variables to allow Drupal to find the configuration file. If no site is specified with the --uri options, Drush will assume the site is 'default', which mimics Drupal's behaviour. Note that it is necessary to specify a full URI, e.g. --uri=http://example.com, in order for certain Drush commands and Drupal modules to behave correctly. See the [example Config file](../examples/example.drush.yml) for more information. Any code that needs to modify or interact with a specific Drupal site's settings.php file should bootstrap to this phase.
Set up a Drupal site directory and the correct environment variables to allow Drupal to find the configuration file. If no site is specified with the --uri options, Drush will assume the site is 'default', which mimics Drupal's behaviour. Note that it is necessary to specify a full URI, e.g. --uri=http://example.com, in order for certain Drush commands and Drupal modules to behave correctly. See the [example Config file](https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml) for more information. Any code that needs to modify or interact with a specific Drupal site's settings.php file should bootstrap to this phase.

@bootstrap configuration
---------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions docs/css/extra.readthedocs.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*Remove right hand column*/
.wy-nav-content {
max-width: unset;
}
1 change: 1 addition & 0 deletions docs/img/drush_logo-black.png
1 change: 1 addition & 0 deletions docs/img/favicon.ico
1 change: 1 addition & 0 deletions docs/img/icon_PhpStorm.png
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ site_url: http://docs.drush.org
repo_url: https://github.com/drush-ops/drush
repo_name: GitHub
edit_uri: blob/master/docs/
extra_css:
- misc/extra.readthedocs.css
#include_search: true
pages:
- Home: index.md
Expand Down
11 changes: 7 additions & 4 deletions src/Commands/core/MkCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ protected function writeyml($nav, $dest)
'name' => 'readthedocs',
],
'site_url' => 'http://commands.drush.org',
'extra_css' => ['css/extra.readthedocs.css'],
'markdown_extensions' => [
['toc' => [
'toc_depth' => 0,
Expand Down Expand Up @@ -174,11 +175,13 @@ protected function prepare($destination)
$fs->mkdir($dest);
$docs_dir = Path::join($dest, 'docs');
$fs->mkdir($docs_dir);
$favicon_dir = Path::join($dest, 'docs', 'img');
$fs->mkdir($favicon_dir);
$fs->copy('../misc/favicon.ico', Path::join($favicon_dir, 'favicon.ico'));
$img_dir = Path::join($dest, 'docs', 'img');
$fs->mkdir($img_dir);
$fs->copy('../misc/favicon.ico', Path::join($img_dir, 'favicon.ico'));
$fs->copy('../drush_logo-black.png', Path::join($img_dir, 'drush_logo-black.png'));
$fs->copy('../misc/icon_PhpStorm.png', Path::join($img_dir, 'icon_PhpStorm.png'));
$fs->copy('../docs/index.md', Path::join($docs_dir, 'index.md'));
// $fs->copy('../drush_logo-black.png', Path::join($docs_dir, 'logo.png'));
$fs->mirror('../docs/css', Path::join($docs_dir, 'css'));
}

/**
Expand Down

0 comments on commit 28e33bf

Please sign in to comment.