From 51cb693229925f3ed275a02d066c442bf1a51661 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Fri, 14 Dec 2018 15:06:43 +1100 Subject: [PATCH 1/9] clean up regexes, remove another weird tag --- lib/github/commands/pod62html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index e9e5316a..f034a556 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -5,6 +5,7 @@ use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; use Pod::To::HTML; $_ = Pod::To::HTML.render(slurp); -s:s{\<\!doctype html\>.*\
\<\/div\>\s*} = ""; -s:s{\s*\<\/div\>\s*\<\/body\>\s*\<\/html\>\s*} = ""; +s:s{'' .* '
' \s*} = ""; +s:s{\s* '
' \s* '' \s* '' \s*} = ""; +s:s{'
Date: Mon, 17 Dec 2018 13:36:19 +1100 Subject: [PATCH 2/9] use latest Pod::To::HTML, no more eval --- .gitmodules | 3 +++ lib/github/commands/pod62html | 8 ++++++-- vendor/Pod-To-HTML | 2 +- vendor/p6-pod-load | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) create mode 160000 vendor/p6-pod-load diff --git a/.gitmodules b/.gitmodules index 1875291b..bbb6b614 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "vendor/Pod-To-HTML"] path = vendor/Pod-To-HTML url = https://github.com/perl6/Pod-To-HTML +[submodule "vendor/p6-pod-load"] + path = vendor/p6-pod-load + url = https://github.com/JJ/p6-pod-load diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index f034a556..b8c13b41 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -1,11 +1,15 @@ #!/usr/bin/env perl6 use v6; + +use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-pod-load'; +use Pod::Load; + use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; use Pod::To::HTML; -$_ = Pod::To::HTML.render(slurp); +$_ = Pod::To::HTML.render(load(slurp)); s:s{'' .* '
' \s*} = ""; s:s{\s* '
' \s* '' \s* '' \s*} = ""; -s:s{'
Date: Mon, 17 Dec 2018 13:40:07 +1100 Subject: [PATCH 3/9] tweak expected output --- test/markups/README.pod6.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html index 3b55d843..16951ee0 100644 --- a/test/markups/README.pod6.html +++ b/test/markups/README.pod6.html @@ -23,7 +23,6 @@

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.

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.

@@ -125,4 +124,3 @@

Adding definitions

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

-
\ No newline at end of file From c0452d671ae0eddb97c1614c854cf7e86224e859 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 13:54:45 +1100 Subject: [PATCH 4/9] don't install from zef --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e409f596..b6d066c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_install: - 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 rakudo-pkg - - export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin && install-zef-as-user && zef install Pod::To::HTML + - export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin - curl -L http://cpanmin.us | perl - --sudo App::cpanminus - sudo cpanm --installdeps --notest Pod::Simple - sudo pip install docutils From d1461feeb2305909dcd7e8325e5b2e1dcadac226 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 14:03:54 +1100 Subject: [PATCH 5/9] remove jvm from travis build matrix --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b6d066c5..15942b74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,6 @@ rvm: - 2.2.7 - 2.3.4 - 2.4.1 - - jruby-9.1.9.0 -jdk: - - oraclejdk8 notifications: email: false git: @@ -28,6 +25,3 @@ cache: env: global: - "JRUBY_OPTS=-Xcext.enabled=true" -matrix: - allow_failures: - - rvm: jruby-9.1.9.0 From a34a7235cbd575c025f82e9713388a3b119805b8 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 14:10:19 +1100 Subject: [PATCH 6/9] add p6 uri --- .gitmodules | 3 +++ lib/github/commands/pod62html | 5 +++-- vendor/uri | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) create mode 160000 vendor/uri diff --git a/.gitmodules b/.gitmodules index bbb6b614..793e296f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "vendor/p6-pod-load"] path = vendor/p6-pod-load url = https://github.com/JJ/p6-pod-load +[submodule "vendor/uri"] + path = vendor/uri + url = https://github.com/perl6-community-modules/uri diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index b8c13b41..1c0ab8a2 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -3,9 +3,10 @@ use v6; use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-pod-load'; -use Pod::Load; - use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; +use lib $*PROGRAM.IO.parent.add: '../../../vendor/uri'; + +use Pod::Load; use Pod::To::HTML; $_ = Pod::To::HTML.render(load(slurp)); diff --git a/vendor/uri b/vendor/uri new file mode 160000 index 00000000..e5c85512 --- /dev/null +++ b/vendor/uri @@ -0,0 +1 @@ +Subproject commit e5c85512db5446fa4f7a38e421170cd602a53dce From 647fac6c17747e9194fcdee1ec547241c8d5ba39 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 14:15:55 +1100 Subject: [PATCH 7/9] add Template-Mustache submodule --- .gitmodules | 3 +++ lib/github/commands/pod62html | 1 + vendor/p6-Template-Mustache | 1 + 3 files changed, 5 insertions(+) create mode 160000 vendor/p6-Template-Mustache diff --git a/.gitmodules b/.gitmodules index 793e296f..e770ee37 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "vendor/uri"] path = vendor/uri url = https://github.com/perl6-community-modules/uri +[submodule "vendor/p6-Template-Mustache"] + path = vendor/p6-Template-Mustache + url = https://github.com/softmoth/p6-Template-Mustache diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index 1c0ab8a2..ba50226c 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -5,6 +5,7 @@ use v6; use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-pod-load'; use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; use lib $*PROGRAM.IO.parent.add: '../../../vendor/uri'; +use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-Template-Mustache'; use Pod::Load; use Pod::To::HTML; diff --git a/vendor/p6-Template-Mustache b/vendor/p6-Template-Mustache new file mode 160000 index 00000000..d84fdf30 --- /dev/null +++ b/vendor/p6-Template-Mustache @@ -0,0 +1 @@ +Subproject commit d84fdf303480622805de119024e930c05c9fd6d2 From f7fc90c212f34e5ce6d52e4bbed99d43500457c3 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 14:54:41 +1100 Subject: [PATCH 8/9] include all of vendor/ in gem --- github-markup.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-markup.gemspec b/github-markup.gemspec index 2459b753..88212c66 100644 --- a/github-markup.gemspec +++ b/github-markup.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.license = "MIT" s.files = `git ls-files`.split($\) - s.files += Dir['vendor/Pod-To-HTML/**/*'] + s.files += Dir['vendor/**/*'] s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) } s.test_files = s.files.grep(%r{^(test|spec|features)/}) s.require_paths = %w[lib] From b8843a4b81d31495b90a0c63a3daafef45a4a2f0 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Mon, 17 Dec 2018 16:45:38 +1100 Subject: [PATCH 9/9] replace with passthrough --- .gitmodules | 12 --- lib/github/commands/pod62html | 14 +--- test/markups/README.pod6 | 151 ---------------------------------- test/markups/README.pod6.html | 126 ---------------------------- vendor/Pod-To-HTML | 1 - vendor/p6-Template-Mustache | 1 - vendor/p6-pod-load | 1 - vendor/uri | 1 - 8 files changed, 1 insertion(+), 306 deletions(-) delete mode 100644 .gitmodules delete mode 100644 test/markups/README.pod6 delete mode 100644 test/markups/README.pod6.html delete mode 160000 vendor/Pod-To-HTML delete mode 160000 vendor/p6-Template-Mustache delete mode 160000 vendor/p6-pod-load delete mode 160000 vendor/uri diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e770ee37..00000000 --- a/.gitmodules +++ /dev/null @@ -1,12 +0,0 @@ -[submodule "vendor/Pod-To-HTML"] - path = vendor/Pod-To-HTML - url = https://github.com/perl6/Pod-To-HTML -[submodule "vendor/p6-pod-load"] - path = vendor/p6-pod-load - url = https://github.com/JJ/p6-pod-load -[submodule "vendor/uri"] - path = vendor/uri - url = https://github.com/perl6-community-modules/uri -[submodule "vendor/p6-Template-Mustache"] - path = vendor/p6-Template-Mustache - url = https://github.com/softmoth/p6-Template-Mustache diff --git a/lib/github/commands/pod62html b/lib/github/commands/pod62html index ba50226c..b2d27764 100755 --- a/lib/github/commands/pod62html +++ b/lib/github/commands/pod62html @@ -2,16 +2,4 @@ use v6; -use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-pod-load'; -use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; -use lib $*PROGRAM.IO.parent.add: '../../../vendor/uri'; -use lib $*PROGRAM.IO.parent.add: '../../../vendor/p6-Template-Mustache'; - -use Pod::Load; -use Pod::To::HTML; - -$_ = Pod::To::HTML.render(load(slurp)); -s:s{'' .* '
' \s*} = ""; -s:s{\s* '
' \s* '' \s* '' \s*} = ""; -s:s{'
. - -The official source for this documentation is located at L. - -This particular document is a quick overview of the process -described in more detail in L. -This document also provides a short introduction to writing Perl 6 -Pod files, which can be rendered into HTML and other formats. - -=head1 Structure - -All of the documentation is written in Perl 6 Pod and kept in the C -directory, and the C and C sub-directories. -These files are processed as collections of definitions or -"documentables", which are then post-processed and linked together. - -=head1 Generating HTML from Pod - -To generate HTML from the Pod files, you'll need: - -=item A recent version of the Rakudo Perl 6 compiler - -=item The Perl 6 modules Pod::To::HTML, Pod::To::BigPage, and URI::Escape -(can be installed via L). - -=item B: L, for creating graphs -of the relationships between Perl 6 types - -=item B: L and L, for syntax -highlighting - -To generate the documentation into the C folder, run: - -=begin code :lang -perl6 htmlify.p6 -=end code - -To host the documentation from a web server, have Perl 5 -and Mojolicious::Lite installed, then run: - -=begin code :lang -perl app.pl daemon -=end code - -=head1 Contributing - -The documentation is written in Perl 6 Pod. - -For a quick introduction to Perl 6 Pod, see L. - -For full details about the Perl 6 Pod specification, see L. - -=head2 Adding definitions - -Documentables can be defined using an C<=headN> Pod directive, where -C is greater than zero (e.g., C<=head1>, C<=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: - -=begin code :allow :skip-test -=head2 R - -Some paragraphs, followed by some code: - - my Code $examples = "amazing"; - -Mind === blown. - -=head3 Minor details about R - -It's fantastic. - -=head2 And now, for something completely different - -… - -=end code - -The documentable R extends down to the C<=head2 And now…>. - -Documentables may contain other documentables. Class documentables, for -example, often contain the methods the class implements. - -Definitions must be in one of the following forms to be recognized as -the start of a documentable named, say, þ. First the code in the document source: - -=begin code :skip-test - -=item X | infix,þ> (This a special case, which -is always considered a definition) - -=item C - -=item B Infix> - -=item C - -=item B> - -=item C (A special case for the L documentables) - -=end code - -Then the results on the rendered page: - -=item X | infix,þ> (This is a special case, which -is always considered a definition) - -=item C - -=item B Infix> - -=item C - -=item B> - -=item C (A special case for the L documentables) - -These items should now be searchable by using the search field in the HTML docs. - -You can add emphasis with bold (B >>) or italicized (B >>), -with or without code formatting (B >>). Due to current parser limitations, -special steps have to be taken to use B >> with other formatting codes; for example: - -=begin code :skip-test -=item X|foo> a fancy subroutine -=end code - -renders like this - -=item X|foo> a fancy subroutine - -Notice that text after a pipe ('|') has no formatting. Also note that B >> -preserves spaces and treats text as verbatim. -=end pod - diff --git a/test/markups/README.pod6.html b/test/markups/README.pod6.html deleted file mode 100644 index 16951ee0..00000000 --- a/test/markups/README.pod6.html +++ /dev/null @@ -1,126 +0,0 @@ -

About the Docs

-

Meta-documentation

- - -

Table of Contents

- - - - - - - - - - - - - - - - - -
1Structure
2Generating HTML from Pod
3Contributing
3.1Adding definitions
- - -

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.

-

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.

-

Generating HTML from Pod

-

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

-
    -
  • -

    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).

    -
  • -
  • -

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

    -
  • -
  • -

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

    -
  • -
-

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:

-
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.

-

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:

-
=head2 My Definition
-
-Some paragraphs, followed by some code:
-
-    my Code $examples = "amazing";
-
-Mind === blown.
-
-=head3 Minor details about My Definition
-
-It's fantastic.
-
-=head2 And now, for something completely different
-
-…
-
-
-

The documentable My Definition extends down to the =head2 And now….

-

Documentables may contain other documentables. Class documentables, for example, often contain the methods the class implements.

-

Definitions must be in one of the following forms to be recognized as the start of a documentable named, say, þ. First the code in the document source:

-
=item X<C<How to use the þ infix> | infix,þ> (This a special case, which
-is always considered a definition)
-
-=item C<The þ Infix>
-
-=item B<The C<þ> Infix>
-
-=item C<Infix þ>
-
-=item B<Infix C<þ>>
-
-=item C<trait is cached> (A special case for the L<trait|/language/functions#Traits> documentables)
-
-
-

Then the results on the rendered page:

-
    -
  • -

    How to use the þ infix (This is a special case, which is always considered a definition)

    -
  • -
  • -

    The þ Infix

    -
  • -
  • -

    The þ Infix

    -
  • -
  • -

    Infix þ

    -
  • -
  • -

    Infix þ

    -
  • -
  • -

    trait is cached (A special case for the trait documentables)

    -
  • -
-

These items should now be searchable by using the search field in the HTML docs.

-

You can add emphasis with bold ( B<> ) or italicized ( I<> ), with or without code formatting ( C<> ). Due to current parser limitations, special steps have to be taken to use X<> with other formatting codes; for example:

-
=item X<B<foo>|foo> a fancy subroutine
-
-

renders like this

-
    -
  • -

    foo a fancy subroutine

    -
  • -
-

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

diff --git a/vendor/Pod-To-HTML b/vendor/Pod-To-HTML deleted file mode 160000 index a8d07053..00000000 --- a/vendor/Pod-To-HTML +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a8d07053ce61f4bb90725d31073cf38380a171b4 diff --git a/vendor/p6-Template-Mustache b/vendor/p6-Template-Mustache deleted file mode 160000 index d84fdf30..00000000 --- a/vendor/p6-Template-Mustache +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d84fdf303480622805de119024e930c05c9fd6d2 diff --git a/vendor/p6-pod-load b/vendor/p6-pod-load deleted file mode 160000 index 66fc6158..00000000 --- a/vendor/p6-pod-load +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 66fc6158e7c22e8a7a5f90de342e799c7fb2315e diff --git a/vendor/uri b/vendor/uri deleted file mode 160000 index e5c85512..00000000 --- a/vendor/uri +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e5c85512db5446fa4f7a38e421170cd602a53dce