From 811148744b9752e22d3c6a1db87bddf01c5107c1 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 10 Dec 2018 12:50:54 +1100 Subject: [PATCH] cleanup/fixes --- .travis.yml | 6 ++- README.md | 2 +- lib/github/markups.rb | 2 +- test/markup_test.rb | 1 + test/markups/README.pod6.html | 82 +++++++++++++++++------------------ 5 files changed, 46 insertions(+), 47 deletions(-) diff --git a/.travis.yml b/.travis.yml index b7d7ecf1..e409f596 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,11 @@ notifications: git: depth: 10 before_install: + - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 379CE192D401AB61 + - echo "deb https://dl.bintray.com/nxadm/rakudo-pkg-debs `lsb_release -cs` main" | sudo tee -a /etc/apt/sources.list.d/rakudo-pkg.list - sudo apt-get update -qq - - sudo apt-get install perl - - wget -O /tmp/perl6.deb https://github.com/nxadm/rakudo-pkg/releases/download/v2018.02.1/rakudo-pkg-Ubuntu14.04_2018.02.1-01_amd64.deb && sudo dpkg -i /tmp/perl6.deb && export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin && install-zef-as-user && zef install Pod::To::HTML + - sudo apt-get install perl rakudo-pkg + - export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin && install-zef-as-user && zef install Pod::To::HTML - curl -L http://cpanmin.us | perl - --sudo App::cpanminus - sudo cpanm --installdeps --notest Pod::Simple - sudo pip install docutils diff --git a/README.md b/README.md index f023abf6..0651c33c 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ or bundle install ``` -from this directory +from this directory. Usage ----- diff --git a/lib/github/markups.rb b/lib/github/markups.rb index 518c52cc..585d54b0 100644 --- a/lib/github/markups.rb +++ b/lib/github/markups.rb @@ -52,4 +52,4 @@ ) command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Perl 6"], "pod6") -command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod$/, ["Pod"], "pod") +command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod/, ["Pod"], "pod") diff --git a/test/markup_test.rb b/test/markup_test.rb index e08b7c12..86c83ee7 100644 --- a/test/markup_test.rb +++ b/test/markup_test.rb @@ -90,6 +90,7 @@ def test_each_render_has_a_name assert_equal "asciidoctor", GitHub::Markup.renderer('README.adoc', '== Title').name assert_equal "restructuredtext", GitHub::Markup.renderer('README.rst', 'Title').name assert_equal "pod", GitHub::Markup.renderer('README.pod', '=head1').name + assert_equal "pod6", GitHub::Markup.renderer('README.pod6', '=begin pod').name end def test_rendering_by_symbol diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html index c0039bc8..5f56257f 100644 --- a/test/markups/README.pod6.html +++ b/test/markups/README.pod6.html @@ -1,35 +1,28 @@ - About the Docs - - - /* code gets the browser-default font - * kbd gets a slightly less common monospace font - * samp gets the hard pixelly fonts - */ - kbd { font-family: "Droid Sans Mono", "Luxi Mono", "Inconsolata", monospace } - samp { font-family: "Terminus", "Courier", "Lucida Console", monospace } - /* WHATWG HTML frowns on the use of <u> because it looks like a link, - * so we make it not look like one. - */ - u { text-decoration: none } - .nested { - margin-left: 3em; - } - // footnote things: - aside, u { opacity: 0.7 } - a[id^="fn-"]:target { background: #ff0 } - - - - - - -
- - -

About the Docs

-

Meta-documentation

- + + + About the Docs + + + kbd { font-family: "Droid Sans Mono", "Luxi Mono", "Inconsolata", monospace } + samp { font-family: "Terminus", "Courier", "Lucida Console", monospace } + u { text-decoration: none } + .nested { + margin-left: 3em; + } + aside, u { opacity: 0.7 } + a[id^="fn-"]:target { background: #ff0 } + + + + + + +
+ +

About the Docs

+

Meta-documentation

+

Table of Contents

@@ -52,24 +45,24 @@

Table of Contents

-
-

This document collection represents the on-going effort to document the Perl 6 programming language with the goals of being: comprehensive; easy to use; easy to navigate; and useful to both newcomers and experienced Perl 6 programmers.

+
+

This document collection represents the on-going effort to document the Perl 6 programming language with the goals of being: comprehensive; easy to use; easy to navigate; and useful to both newcomers and experienced Perl 6 programmers.

An HTML version of the documentation is located online at https://docs.perl6.org.

The official source for this documentation is located at perl6/doc on GitHub.

-

This particular document is a quick overview of the process described in more detail in CONTRIBUTING on GitHub. This document also provides a short introduction to writing Perl 6 Pod files, which can be rendered into HTML and other formats.

+

This particular document is a quick overview of the process described in more detail in CONTRIBUTING on GitHub. This document also provides a short introduction to writing Perl 6 Pod files, which can be rendered into HTML and other formats.

Structure

-

All of the documentation is written in Perl 6 Pod and kept in the doc/ directory, and the doc/Language/ and doc/Type/ sub-directories. These files are processed as collections of definitions or "documentables", which are then post-processed and linked together.

+

All of the documentation is written in Perl 6 Pod and kept in the doc/ directory, and the doc/Language/ and doc/Type/ sub-directories. These files are processed as collections of definitions or "documentables", which are then post-processed and linked together.

Generating HTML from Pod

To generate HTML from the Pod files, you'll need:

  • -

    A recent version of the Rakudo Perl 6 compiler

    +

    A recent version of the Rakudo Perl 6 compiler

  • -

    The Perl 6 modules Pod::To::HTML, Pod::To::BigPage, and URI::Escape (can be installed via zef).

    +

    The Perl 6 modules Pod::To::HTML, Pod::To::BigPage, and URI::Escape (can be installed via zef).

  • -

    Optional: GraphViz, for creating graphs of the relationships between Perl 6 types

    +

    Optional: GraphViz, for creating graphs of the relationships between Perl 6 types

  • Optional: Atom Highlights and language-perl6, for syntax highlighting

    @@ -78,13 +71,13 @@

    Generating HTML from Pod

    To generate the documentation into the html/ folder, run:

    perl6 htmlify.p6
     
    -

    To host the documentation from a web server, have Perl 5 and Mojolicious::Lite installed, then run:

    +

    To host the documentation from a web server, have Perl 5 and Mojolicious::Lite installed, then run:

    perl app.pl daemon
     

    Contributing

    -

    The documentation is written in Perl 6 Pod.

    -

    For a quick introduction to Perl 6 Pod, see Perl 6 Pod.

    -

    For full details about the Perl 6 Pod specification, see Synopsis 26, Documentation.

    +

    The documentation is written in Perl 6 Pod.

    +

    For a quick introduction to Perl 6 Pod, see Perl 6 Pod.

    +

    For full details about the Perl 6 Pod specification, see Synopsis 26, Documentation.

    Adding definitions

    Documentables can be defined using an =headN Pod directive, where N is greater than zero (e.g., =head1, =head2, …).

    All of the paragraphs and blocks following that directive, up until the next directive of the same level, will be considered part of the documentable. So, in:

    @@ -155,4 +148,7 @@

    Adding definitions

Notice that text after a pipe ('|') has no formatting. Also note that C<> preserves spaces and treats text as verbatim.

-
+
+ + +