Steve Losh avatar Steve Losh committed 187b25f

Update the docs to work with the new version of Markdoc.

Comments (0)

Files changed (18)

docs/.templates/404.html

-{% extends 'markdoc-default/404.html' %}

docs/.templates/base.html

-{% extends 'markdoc-default/base.html' %}

docs/.templates/document.html

-{% extends 'markdoc-default/document.html' %}

docs/.templates/listing.html

-{% extends 'markdoc-default/listing.html' %}

docs/.templates/macros/html

-{% macro cssimport(css_href, document_root="", media="screen, projection") -%}
-    <link rel="stylesheet" type="text/css" href="{{ document_root }}{{ css_href }}" {% if media %}media="{{ media }}" {% endif %}/>
-{%- endmacro %}
-
-{% macro css() -%}
-    <style type="text/css">
-        {{ caller() }}
-    </style>
-{%- endmacro %}
-
-{% macro jsimport(js_href, document_root="") -%}
-    <script type="application/javascript" src="{{ document_root }}{{ js_href }}"></script>
-{%- endmacro %}
-
-{% macro js() -%}
-    <script type="text/javascript">
-        {{ caller() }}
-    </script>
-{%- endmacro %}

docs/.templates/markdoc-default/404.html

-{% extends 'base.html' %}
-
-{% block body %}
-<h1>Not Found: <code>{{ request.path_info|e }}</code></h1>
-<p>
-  We couldn&#8217;t find what you were looking for.
-  {% if not is_index %}You could try going <a href="{{ document_root }}/">home</a>.{% endif %}
-</p>
-{% endblock %}

docs/.templates/markdoc-default/base.html

-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-  <head>
-    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-    
-    <title>
-      {% if 'wiki-name' in config %}{{ config['wiki-name']|e }} » {% endif -%}
-      {% block title %}{{ title }}{% endblock %}
-    </title>
-    
-    {% import "macros/html" as html -%}
-    
-    {{ html.cssimport("/media/css/reset.css", document_root) }}
-    {{ html.cssimport("/media/css/layout.css", document_root) }}
-    {{ html.cssimport("/media/css/typography.css", document_root) }}
-    {{ html.cssimport("/media/css/pygments.css", document_root) }}
-  </head>
-  
-  <body>
-    {% if crumbs %}
-        <div id="breadcrumbs">
-          <p>
-              {% for name, href in crumbs %}
-                {% if href == None %}
-                  {{ name|e }}
-                {% else %}
-                  <a href="{{ document_root }}{{ href|e }}">{{ name|e }}</a>{% if loop.revindex0 %} &#187;{% endif %}
-                {% endif %}
-              {% endfor %}
-          </p>
-        </div> <!-- div#breadcrumbs -->
-      {% endif %}
-      
-    <div id="content">
-      
-      {% block body %}
-      {% endblock %}
-    
-    </div> <!-- div#content -->
-    <div id="footer">
-        <p>
-            {% if 'wiki-name' in config %}
-            {{ config['wiki-name']|e }} &mdash;
-            {% endif %}
-            Powered by <a href="http://bitbucket.org/zacharyvoase/markdoc">Markdoc</a>.
-        </p>
-    </div>
-    
-  </body>
-</html>

docs/.templates/markdoc-default/document.html

-{% extends 'base.html' %}
-
-{% block body %}
-  {{ content }}
-{% endblock %}

docs/.templates/markdoc-default/listing.html

-{% extends 'base.html' %}
-
-{% block title %}ls /{{ directory|e }}{% endblock %}
-
-{% block body %}
-  <h1><code>ls /{{ directory|e }}</code></h1>
-
-  {% if sub_directories %}
-  <h2>Directories</h2>
-
-  <table id="subdirs">
-    {% for subdir in sub_directories %}
-      <tr>
-        <td class="name">
-          <a class="dirlink" href="{{ document_root }}{{ subdir.href|e }}">
-            {{ subdir.basename|e }}/
-          </a>
-        </td>
-      </tr>
-    {% endfor %}
-  </table>
-  {% endif %}
-
-  {% if pages %}
-  <h2>Pages</h2>
-
-  <table id="pages">
-    {% for page in pages %}
-      <tr>
-        <td class="size">{{ page.humansize }}</td>
-        <td class="name">
-          <a href="{{ document_root }}{{ page.href|e }}.html" title="{{ page.title|e }}">
-            {{ page.title|e }}
-          </a>
-        </td>
-      </tr>
-    {% endfor %}
-  </table>
-  {% endif %}
-
-  {% if files %}
-  <h2>Files</h2>
-
-  <table id="files">
-    {% for file in files %}
-      <tr>
-        <td class="size">{{ file.humansize }}</td>
-        <td class="name">
-          <a href="{{ document_root }}{{ file.href|e }}">
-            <code>{{ file.basename|e }}</code>
-          </a>
-        </td>
-      </tr>
-    {% endfor %}
-  </table>
-  {% endif %}
-{% endblock %}

docs/markdoc.yaml

 wiki-name: "hg-prompt"
 
 
-template-dir: ".templates"
 static-dir: "static"
 
 hide-prefix: "."
 listing-filename: "list.html"
 
 use-default-static: false
-use-default-templates: false
 
 markdown:
   safe_mode: false
 #!/usr/bin/env bash
 
-markdoc build --document-root '/hg-prompt/'
+markdoc build
 rsync --delete -az .html/ ~/src/sjl.bitbucket.org/hg-prompt
 hg -R ~/src/sjl.bitbucket.org commit -Am 'hg-prompt: Update documentation.'
 hg -R ~/src/sjl.bitbucket.org push

docs/static/media/css/layout.css

+/* @override http://localhost:8008/media/css/layout.css */
 body, html {
 	background-color: #226F89;
 	margin: 0;
 
 div#breadcrumbs {
 	border-bottom: 4px dashed #265565;
-	border-left: 1px solid #265565;
 	border-right: 1px solid #265565;
-	margin: 0 auto;
-	padding: 0.5em 1.5em;
+	padding: 0em 1.5em;
 	background-color: #fff;
 	width: 55em;
+	margin: 0em 0em 0em -1.5em;
 }
 div#breadcrumbs p {
-	margin-bottom: 0.2em;
+	margin: 0.5em auto;
 }
 div#content {
 	background-color: #fff;
 	height: 100%;
-	margin: 0 auto;
+	margin: 0 auto 3em;
 	overflow: hidden;
-	padding: 1em 1.5em 1.5em 1.5em;
+	padding: 0em 1.5em 0em 1.5em;
 	width: 55em;
 	border-left: 1px solid #265565;
 	border-right: 1px solid #265565;
 	color: #F14800;
 }
 
-div#footer {
+p#footer {
 	background-color: #fff;
-	border: 1px solid #265565;
 	border-top: 4px dashed #265565;
 	width: 55em;
-	padding: 1em 1.5em;
-	margin: 0 auto;
-	margin-bottom: 3em;
+	padding: 0.75em 1.5em;
 	text-align: center;
 	color: #666;
-}
-div#footer p {
-    margin: 0;
-    padding: 0;
+	margin-left: -1.5em;
+	margin-bottom: 0em;
 }
 
 ul {

docs/wiki/documentation/index.mdown

 Documentation
 =============
 
-##[Usage](/hg-prompt/documentation/usage/)##
+##[Usage](/documentation/usage/)##
 
 How the `hg prompt` command can be used.
 
-##[Keywords](/hg-prompt/documentation/keywords/)##
+##[Keywords](/documentation/keywords/)##
 
 Keywords available to use with the command.
 
-##[Sample Prompts](/hg-prompt/documentation/samples/)##
+##[Sample Prompts](/documentation/samples/)##
 
 Some sample prompts to get you started.

docs/wiki/documentation/keywords/index.mdown

 
 There a number of keywords available.  If you have any suggestions for more please [let me know][issues].
 
-[issues]: http://bitbucket.org/sjl/hg-prompt/issues
+[issues]: http://bitbucket.org/sjl/issues
 
 Some of the keywords support filters.  These filters can be combined when it makes sense.  If in doubt, try it!
 

docs/wiki/documentation/usage/index.mdown

 
 Take a look at the [keywords][] documentation to see all the keywords `hg-prompt` supports.
 
-[keywords]: /hg-prompt/documentation/keywords/
+[keywords]: /documentation/keywords/

docs/wiki/index.mdown

 [Code][]
 --------
 
-[Installation]: /hg-prompt/installation/
-[Quick Start]: /hg-prompt/quickstart/
-[Full Documentation]: /hg-prompt/documentation/
-[Code]: http://bitbucket.org/sjl/hg-prompt/
+[Installation]: /installation/
+[Quick Start]: /quickstart/
+[Full Documentation]: /documentation/
+[Code]: http://bitbucket.org/sjl
 
 Screenshot
 ----------

docs/wiki/installation/index.mdown

 First, clone the repository:
 
     :::console
-    $ hg clone http://bitbucket.org/sjl/hg-prompt/
+    $ hg clone http://bitbucket.org/sjl/
 
 Edit the `[extensions]` section in your `~/.hgrc` file:
 
     :::cfg
     [extensions]
-    prompt = (path to)/hg-prompt/prompt.py
+    prompt = (path to)/prompt.py
 
 Make sure everything is working:
 
 
 Take a look at the [Quick Start][] guide to learn how to put some useful information into your shell prompt.
 
-[Quick Start]: /hg-prompt/quickstart/
+[Quick Start]: /quickstart/

docs/wiki/quickstart/index.mdown

 
 If you haven't already [installed][install] it, do that now.
 
-[install]: /hg-prompt/installation/
+[install]: /installation/
 
 A Simple (But Useful) Prompt
 ----------------------------
 
 From here you can take a look at the [full documentation][] to see all the interesting things `hg-prompt` can do.
 
-[full documentation]: /hg-prompt/documentation/
+[full documentation]: /documentation/
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.