-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds POD6, the markup language for Perl6, to the repo #1173
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
31ed043
Adds perl6 test from perl6/doc home
JJ 3286a7e
Adds files (and modifies) for perl6 refs #907
JJ 8c5fc3d
Cleanup
JJ c08633c
Cleanup
JJ a6dc077
Reduced errors to 0
JJ f3cd92a
Test-driving travis now
JJ ce7705c
Use direct link
JJ fed288a
Adjusts path
JJ d0f9a82
Adds POD6 to README.
JJ e70b3ee
Clarifying dependencies.
4406f72
Merge remote-tracking branch 'origin/master' into JJ-master
kivikakk 8111487
cleanup/fixes
kivikakk f7a96cc
add testing Dockerfile
kivikakk 9c5ea1a
use linguist 7
kivikakk 83dfbbb
we're calling it Pod 6
kivikakk e953f70
trim heading/leading text
kivikakk 7d24dd1
raise when lang missing
kivikakk ed385c6
update pod6 test
kivikakk bf3ad46
vend Pod::To::HTML
kivikakk 27e4eea
add Pod-To-HTML to gem
kivikakk 455a75d
minimum 7.1.3
kivikakk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
pkg/ | ||
.bundle | ||
Gemfile.lock | ||
vendor/ | ||
.project | ||
.buildpath | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "vendor/Pod-To-HTML"] | ||
path = vendor/Pod-To-HTML | ||
url = https://github.com/perl6/Pod-To-HTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FROM ubuntu:trusty | ||
|
||
RUN apt-get update -qq | ||
RUN apt-get install -y apt-transport-https | ||
|
||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 379CE192D401AB61 | ||
RUN echo "deb https://dl.bintray.com/nxadm/rakudo-pkg-debs `lsb_release -cs` main" | tee -a /etc/apt/sources.list.d/rakudo-pkg.list | ||
RUN apt-get update -qq | ||
|
||
RUN apt-get install -y \ | ||
perl rakudo-pkg curl git build-essential python python-pip \ | ||
libssl-dev libreadline-dev zlib1g-dev \ | ||
libicu-dev cmake pkg-config | ||
|
||
ENV PATH $PATH:/opt/rakudo-pkg/bin | ||
RUN install-zef-as-user && zef install Pod::To::HTML | ||
|
||
RUN curl -L http://cpanmin.us | perl - App::cpanminus | ||
RUN cpanm --installdeps --notest Pod::Simple | ||
|
||
RUN pip install docutils | ||
|
||
ENV PATH $PATH:/root/.rbenv/bin:/root/.rbenv/shims | ||
RUN curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash | ||
RUN rbenv install 2.4.1 | ||
RUN rbenv global 2.4.1 | ||
RUN rbenv rehash | ||
|
||
RUN gem install bundler | ||
|
||
WORKDIR /data/github-markup | ||
COPY github-markup.gemspec . | ||
COPY Gemfile . | ||
COPY Gemfile.lock . | ||
COPY lib/github-markup.rb lib/github-markup.rb | ||
RUN bundle | ||
|
||
ENV LC_ALL en_US.UTF-8 | ||
RUN locale-gen en_US.UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env perl6 | ||
|
||
use v6; | ||
use lib $*PROGRAM.IO.parent.add: '../../../vendor/Pod-To-HTML'; | ||
use Pod::To::HTML; | ||
|
||
$_ = Pod::To::HTML.render(slurp); | ||
s:s{\<\!doctype html\>.*\<div id\=\"___top\"\>\<\/div\>\s*} = ""; | ||
s:s{\s*\<\/div\>\s*\<\/body\>\s*\<\/html\>\s*} = ""; | ||
.put; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
=begin pod | ||
|
||
=TITLE About the Docs | ||
|
||
=SUBTITLE Meta-documentation | ||
|
||
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 | ||
L<https://docs.perl6.org>. | ||
|
||
The official source for this documentation is located at L<perl6/doc on | ||
GitHub|https://github.com/perl6/doc>. | ||
|
||
This particular document is a quick overview of the process | ||
described in more detail in L<CONTRIBUTING on GitHub|https://github.com/perl6/doc/blob/master/CONTRIBUTING.md>. | ||
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<doc/> | ||
directory, and the C<doc/Language/> and C<doc/Type/> 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<zef|https://github.com/ugexe/zef>). | ||
|
||
=item B<Optional>: L<GraphViz|http://graphviz.org>, for creating graphs | ||
of the relationships between Perl 6 types | ||
|
||
=item B<Optional>: L<Atom Highlights|https://github.com/atom/highlights> and L<language-perl6|https://atom.io/packages/language-perl6>, for syntax | ||
highlighting | ||
|
||
To generate the documentation into the C<html/> folder, run: | ||
|
||
=begin code :lang<shell> | ||
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<shell> | ||
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<Perl 6 Pod|https://docs.perl6.org/language/pod>. | ||
|
||
For full details about the Perl 6 Pod specification, see L<Synopsis 26, Documentation|https://design.perl6.org/S26.html>. | ||
|
||
=head2 Adding definitions | ||
|
||
Documentables can be defined using an C<=headN> Pod directive, where | ||
C<N> 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<R> :skip-test | ||
=head2 R<My Definition> | ||
|
||
Some paragraphs, followed by some code: | ||
|
||
my Code $examples = "amazing"; | ||
|
||
Mind === blown. | ||
|
||
=head3 Minor details about R<My Definition> | ||
|
||
It's fantastic. | ||
|
||
=head2 And now, for something completely different | ||
|
||
… | ||
|
||
=end code | ||
|
||
The documentable R<My Definition> 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<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) | ||
|
||
=end code | ||
|
||
Then the results on the rendered page: | ||
|
||
=item X<C<How to use the þ infix> | infix,þ> (This is 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) | ||
|
||
These items should now be searchable by using the search field in the HTML docs. | ||
|
||
You can add emphasis with bold (B<V< B<> >>) or italicized (B<V< I<> >>), | ||
with or without code formatting (B<V< C<> >>). Due to current parser limitations, | ||
special steps have to be taken to use B<V< X<> >> with other formatting codes; for example: | ||
|
||
=begin code :skip-test | ||
=item X<B<foo>|foo> a fancy subroutine | ||
=end code | ||
|
||
renders like this | ||
|
||
=item X<B<foo>|foo> a fancy subroutine | ||
|
||
Notice that text after a pipe ('|') has no formatting. Also note that B<V< C<> >> | ||
preserves spaces and treats text as verbatim. | ||
=end pod | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe do this change as a separate PR? There's already another one with some README additions that this might be combined with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which one do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was thinking of this one: https://github.com/github/markup/pull/1174/files