Skip to content

Commit 342f4cc

Browse files
committed
Merge branch 'extra-twigils' of github.com:perl6/doc into extra-twigils
2 parents 1acc2a0 + 98eee05 commit 342f4cc

File tree

181 files changed

+9914
-4753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+9914
-4753
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ addons:
1010
- g++-4.8
1111
- ruby-sass
1212

13+
fast_finish: true
14+
1315
branches:
1416
except:
1517
- gh-pages
@@ -35,11 +37,10 @@ install:
3537
- export PATH="$PATH:/$HOME/.rakudobrew/moar-nom/install/share/perl6/site/bin"
3638
- travis_retry zef --/tap-harness --force --/test install LWP::Simple
3739
- travis_retry zef --/tap-harness --depsonly install .
38-
- travis_retry zef --/tap-harness install Pod::To::HTML
3940

4041
script:
4142
- make test
42-
- export CXX=g++-4.8
43+
- export CXX=$(command -v g++-4.8 >/dev/null 2>&1; if [ $? -eq 1 ]; then printf "g++"; else printf "g++-4.8"; fi)
4344
- $CXX --version
4445
- make html
4546
matrix:

CONTRIBUTING.md

Lines changed: 18 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@ in the [#perl6 IRC channel](https://perl6.org/community/irc).
2323
- [Broken links](#broken-links)
2424
- [Heading numbering](#heading-numbering)
2525
- [Reporting bugs](#reporting-bugs)
26-
- [Website Styles](#website-styles)
2726
- [Building the documentation](#building-the-documentation)
2827
- [Dependency installation](#dependency-installation)
2928
- [Rakudo](#rakudo)
3029
- [Zef](#zef)
3130
- [Pod::To::HTML](#podtohtml)
3231
- [Mojolicious / Web Server](#mojolicious--web-server)
3332
- [SASS compiler](#sass-compiler)
34-
- [pygmentize](#pygmentize)
35-
- [Inline::Python](#inlinepython)
3633
- [Build and view the documentation](#build-and-view-the-documentation)
3734

3835
## General principles
@@ -82,11 +79,11 @@ Fill the documentation file `doc/Type/MyFunnyRole.pod6` like this:
8279

8380
=head2 method do-it
8481

85-
method do-it(Int $how-often) returns Nil:D
82+
method do-it(Int $how-often --> Nil:D)
8683

8784
Method description here
8885

89-
MyFunnyRole.do-it(2); # example output
86+
MyFunnyRole.do-it(2); # OUTPUT: «example output␤»
9087

9188

9289
When documenting a pair of a sub and a method which both do the same thing, the
@@ -96,6 +93,15 @@ more lines with the signatures. Other allowed words instead of `method` are
9693
`term`. If you wish to hide a heading from any index prefix it with the empty
9794
comment `Z<>`.
9895

96+
When providing a code example result or output, use this style:
97+
98+
# For the result of an expression.
99+
1 + 2; # RESULT: «3»
100+
# For the output.
101+
say 1 + 3; # OUTPUT: «3␤»
102+
# For the explanatory comment
103+
do-work; # We call do-work sub
104+
99105
## Running tests
100106

101107
Any contributions should pass the `make test` target. This insures basic
@@ -174,22 +180,17 @@ Report issues at https://github.com/perl6/doc/issues. You can use the
174180
following labels when tagging tickets:
175181

176182
* site - presentation issue with the website (e.g. invalid HTML)
177-
* docs - missing or incorrect documentation
183+
* docs - missing or incorrect documentation (use 'NOTSPECCED' instead, if this is for a feature present in a compiler, but not in the Perl 6 test suite)
178184
* build - scripts or libraries that generate the site
179-
* search - the search component
180-
181-
* LHF - for a beginner to work on
182-
* big - a big issue, may require some research
185+
* search - the search component, either for items that are on the site but not searchable, or for search functionality)
183186

184-
## Website Styles
187+
Contributors may also specify one of the following tags.
185188

186-
The `html/css/style.css` file is built from `assets/sass/style.sass`. Please
187-
don't edit `html/css/style.css` directly, as your changes will be lost
188-
the next time the SASS file is processed.
189+
* LHF - for a beginner to work on
190+
* big - a big issue, requires research or consensus
189191

190-
[SASS](http://sass-lang.com/) is a superset of CSS, so if you don't know SASS,
191-
just write in regular CSS. Run `app.pl` to automatically process SASS and copy
192-
the result over to `html/css/style.css`
192+
If you would like to contribute documentation or other bug fixes, please use
193+
github's Pull request feature.
193194

194195
## Building the documentation
195196

@@ -261,55 +262,6 @@ or the [CSS::Sass Perl 5 module](https://modules.perl6.org/repo/CSS::Sass)
261262
The SASS files are compiled when you run `make html`, or `make sass`, or
262263
start the development webserver (`./app-start`).
263264

264-
#### pygmentize
265-
266-
This program adds syntax highlighting to the code examples. Highlighting of
267-
Perl 6 code was added in version 2.0, so you need at least this version if
268-
you wish to produced syntax highlighted documentation on your local
269-
computer.
270-
271-
If you use Debian/Jessie, you can install `pygmentize` via the
272-
`python-pygments` package:
273-
274-
$ aptitude install python-pygments
275-
276-
On Ubuntu install the package `python-pygments`:
277-
278-
$ sudo apt-get install python-pygments
279-
280-
On Fedora the package is also named `python-pygments`:
281-
282-
$ sudo yum install python-pygments
283-
284-
Otherwise, you probably need to use [`pip`](https://pip.pypa.io/en/latest/)
285-
(the Python package installer):
286-
287-
$ pip install pygmentize
288-
289-
#### Inline::Python
290-
291-
`Inline::Python` is optional, however will speed up documentation builds
292-
using syntax highlighting.
293-
294-
First, you'll need the Python Devel header files and libraries if they have not
295-
already been installed:
296-
297-
On Debian, install the `python-dev` package:
298-
299-
aptitude install python-dev
300-
301-
On Ubuntu, the package is also named `python-dev`:
302-
303-
sudo apt-get install python-dev
304-
305-
On Fedora, install the `python-devel` package:
306-
307-
sudo yum install python-devel
308-
309-
Use `zef` to install the `Inline::Python` module:
310-
311-
$ zef install Inline::Python
312-
313265
### Build and view the documentation
314266

315267
To actually build the documentation all you now need to do is run

CREDITS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ E: email@froggs.de
301301
N: Tokuhiro Matsuno
302302
E: tokuhirom@gmail.com
303303

304-
N: u0097636@kuleuven.be
305-
E: claudio.ramirez@kuleuven.be
304+
N: Claudio Ramirez
305+
E: pub.claudio@gmail.com
306306

307307
N: ugexe
308308
E: nlogan@gmail.com

META.info renamed to META6.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"perl" : "6.*",
33
"name" : "p6doc",
4-
"version" : "*",
4+
"version" : "1.001001",
55
"description" : "Perl 6 documentation (tools and docs)",
6-
"depends" : [ "URI", "File::Temp", "JSON::Fast", "Pod::To::BigPage", "Pod::To::HTML" ],
6+
"license" : "Artistic-2.0",
7+
"depends" : [ "URI", "File::Temp", "JSON::Fast", "Pod::To::BigPage", "Pod::To::HTML",
8+
"OO::Monitors", "IO::String" ],
79
"build-depends" : [ "File::Find" ],
810
"provides" : {
911
"Perl6::Type" : "lib/Perl6/Type.pm",

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ You can then view the examples documentation by pointing your web browser at
7575
You will need at least [Mojolicious](https://metacpan.org/pod/Mojolicious)
7676
installed and you will need [nodejs](https://nodejs.org) to perform highlighting.
7777

78-
--------
78+
---------
7979

8080
## Help Wanted!
8181

@@ -166,3 +166,4 @@ files indicate the copyright and license terms at the top of the file. Currently
166166
* [jQuery Cookie plugin](https://github.com/js-cookie/js-cookie):
167167
Copyright 2006, 2015 Klaus Hartl & Fagner Brack;
168168
[MIT License](http://creativecommons.org/licenses/MIT)
169+
* Examples from Stack Overflow [MIT License](http://creativecommons.org/licenses/MIT); ([ref #1](http://stackoverflow.com/a/43669837/215487) for [1f7cc4e](https://github.com/perl6/doc/commit/1f7cc4efa0da38b5a9bf544c9b13cc335f87f7f6))

app.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
before_dispatch => sub {
3636
my $c = shift;
3737
$c->req->url->path( $c->req->url->path =~ s/::/\$COLON\$COLON/gr )
38-
if $c->req->url->path =~ m{^/type/};
38+
if $c->req->url->path =~ m{^/type/} and $^O =~ m/MSWin/i;
3939
}
4040
);
4141

assets/sass/_highlights.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@
7272
color: #900;
7373
}
7474
/* Regex/Grammars */
75-
75+
.string.regexp.construct {
76+
color: #0078FF;
77+
}
7678
/* `token`, `regex` */
7779
.storage.type.declare.regexp.named {
7880
color: #393276;

assets/sass/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,5 +545,6 @@ div.highlight span.c-Singleline, div.highlight span.c {
545545
}
546546

547547
a[href*="//"]:not([href*="perl6.org"])::after {
548+
padding-left: 2px;
548549
content: url(/images/External-link-04-bold-12x12.svg);
549550
}

doc/HomePage.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Welcome to the official documentation of the <a href="https://perl6.org">Perl 6</a>
44
programming language!
55
Besides online browsing and searching, you can also
6-
Z<< <a>download</a> an offline HTML or PDF copy, and>>
6+
<a href="/perl6.xhtml">view everything in one file</a> or
77
<a href="https://github.com/perl6/doc">contribute</a>
88
by reporting mistakes or sending patches.
99

doc/Language/5to6-nutshell.pod6

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
=begin pod
1+
=begin pod :tag<convert>
22
33
=TITLE 5to6-nutshell
44
@@ -37,22 +37,9 @@ If the module that you were using has not been converted to Perl 6, and no
3737
alternative is listed in this document, then its use under Perl 6 may not
3838
have been addressed yet.
3939
40-
There are multiple projects aiming to make it possible to C<use> Perl 5
41-
modules directly from Perl 6 code:
42-
43-
=defn L<v5|https://github.com/rakudo-p5/v5/>
44-
A slang that lets Rakudo itself parse blocks of Perl 5 code, and compile
45-
them to the same bytecode that it compiles Perl 6 code to.
46-
47-
=defn L<Inline::Perl5|https://github.com/niner/Inline-Perl5/>
48-
Uses an embedded instance of the C<perl> interpreter to run Perl 5 code
49-
called from your Perl 6 script.
50-
51-
Of these, Inline::Perl5 is currently the furthest along and the most
52-
promising.
53-
54-
55-
40+
The L<Inline::Perl5|https://github.com/niner/Inline-Perl5/> project makes
41+
it possible to C<use> Perl 5 modules directly from Perl 6 code by using
42+
an embedded instance of the C<perl> interpreter to run Perl 5 code.
5643
5744
=head1 Syntax
5845

0 commit comments

Comments
 (0)