Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Added option to disable code line wrapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltlombardi committed Apr 26, 2016
1 parent 0dc97fa commit b72d285
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,4 +1,4 @@
site
build
dist
mkdocs_cinder.egg-info/
mkdocs_psinder.egg-info
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
## Changelog

### v0.3.0
Added the option to turn off line-wrap in code blockss and example of this option to the configuration page.

### v0.2.1
Fixed "Edit on Github" functionality; if no repo_branch is specified in the configuration, it will default to the master branch. Otherwise, it will resolve to the specified branch.

Expand Down
10 changes: 9 additions & 1 deletion docs/configuration.md
@@ -1,10 +1,18 @@
# Configuration

### Alternate "Edit on..." Repo Branch
## Alternate "Edit on..." Repo Branch
If you'd like the "Edit on..." link in the footer to point to a branch *other* than master, in the `extra` section of your mkdocs.yml specify `repo_branch: branchName`.

###Example: "Edit on..." Dev Branch
```yaml
extra:
repo_branch: dev
```

## Disable Code Line Wrapping
If you do **not** want code lines to wrap (they do by default), in the `extra` section of your mkdocs.yml specify `nowrap: true`.
This will cause a scroll bar to be added to code blocks which would otherwise wrap.
```yaml
extra:
nowrap: true
```
2 changes: 1 addition & 1 deletion docs/index.md
Expand Up @@ -57,7 +57,7 @@ pages:

Download the Psinder theme archive.

<a href="https://github.com/michaeltlombardi/mkdocs-psinder/releases/download/Latest/mkdocs-psinder-0.1.0.zip"><button type="button" class="btn btn-success"><i class="fa fa-cloud-download"></i> Download Psinder v0.1.0</button></a>
<a href="https://github.com/michaeltlombardi/mkdocs-psinder/releases/download/Latest/mkdocs-psinder-0.3.0.zip"><button type="button" class="btn btn-success"><i class="fa fa-cloud-download"></i> Download Psinder v0.3.0</button></a>

Unpack the contents of the archive into a directory named `psinder` at the top level of your MkDocs project directory.

Expand Down
5 changes: 3 additions & 2 deletions mkdocs.yml
Expand Up @@ -9,5 +9,6 @@ pages:
- Specimen: specimen.md
- Configuration: configuration.md
extra:
version: 0.2.1
repo_branch: dev
version: 0.3.0
repo_branch: dev
use_directory_urls: false
2 changes: 1 addition & 1 deletion mkdocs_psinder.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: mkdocs-psinder
Version: 0.2.0
Version: 0.3.0
Summary: A clean, responsive PowerShell-inspired theme for static documentation websites that are generated with MkDocs - forked with love from Chris Simpkins Cinder
Home-page: https://github.com/michaeltlombardi/mkdocs-psinder
Author: Michael T Lombardi
Expand Down
1 change: 1 addition & 0 deletions mkdocs_psinder.egg-info/SOURCES.txt
Expand Up @@ -20,6 +20,7 @@ psinder/css/bootstrap-custom.css
psinder/css/bootstrap-custom.min.css
psinder/css/font-awesome-4.0.3.css
psinder/css/highlight.css
psinder/css/highlight.nowrap.css
psinder/css/psinder.css
psinder/fonts/fontawesome-webfont.eot
psinder/fonts/fontawesome-webfont.svg
Expand Down
4 changes: 3 additions & 1 deletion psinder/base.html
Expand Up @@ -20,7 +20,9 @@
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,600,700&subset=latin-ext,latin' rel='stylesheet' type='text/css'>
<link href="{{ base_url }}/css/base.css" rel="stylesheet">
<link href="{{ base_url }}/css/psinder.css" rel="stylesheet">
<link rel="stylesheet" href="{{ base_url }}/css/highlight.css">{%- for path in extra_css %}
<link rel="stylesheet" href="{{ base_url }}/css/highlight.css">{% if config.extra.nowrap %}
<link href="{{ base_url }}/css/highlight.nowrap.css" rel="stylesheet">{% endif %}
{%- for path in extra_css %}


<link href="{{ path }}" rel="stylesheet">{%- endfor %}
Expand Down
8 changes: 8 additions & 0 deletions psinder/css/highlight.nowrap.css
@@ -0,0 +1,8 @@
pre {
word-break: keep-all;
word-wrap: normal;
}
pre code {
white-space: pre;
overflow: auto;
}
2 changes: 1 addition & 1 deletion setup.py
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

VERSION = '0.2.1'
VERSION = '0.3.0'


setup(
Expand Down

0 comments on commit b72d285

Please sign in to comment.