slweb

Једноставни генератор статичких веб страна
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување c1e0d91728c86cf4c235d89fb3761a98668018f7
родитељ cc546b019a922c51036114659592cf576874ffbd
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Sun, 10 Jan 2021 15:03:23 +0100

Small manpage fixes

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
Mslweb.1.in | 202+++++++++++++++++++++++++++++++++++++++----------------------------------------
измењених датотека: 1, додавања: 100(+), брисања: 102(-)

diff --git a/slweb.1.in b/slweb.1.in @@ -2,19 +2,43 @@ .\" Manpage for slweb(1) . .mso an-ext.tmac +.de CDS +.EX +.RS \\$1 +.sp 1 +.. +.de CDE +.sp 1 +.RE +.EE +.. . .TH SLWEB "1" "%DATE%" "slweb %VERSION%" "General Commands Manual" .SH NAME slweb \- Simple static website generator . .SH SYNOPSIS +. +.SY slweb +.OP "\-h \fR|\fP \-\-help" +.YS +. +.SY slweb +.OP "\-v \fR|\fP \-\-version" +.YS +. .SY slweb -.RI [ options ] +.OP "\-b \fR|\fP \-\-body-only" +.OP "\-d \fR|\fP \-\-basedir" directory .RI [ filename ] .YS . .SH COPYRIGHT slweb Copyright \(co 2020 Strahinya Radich. +.br +This program is licensed under GNU GPL v3 or later. See the file +.I LICENSE +in the slweb repository for details. . .SH DESCRIPTION .B Slweb @@ -33,9 +57,9 @@ Only add the contents of the \fC<body>\fR tag, skipping \fC<html>\fR and \fC<head>\fR. . .TP -.B \-d <\fIdirectory\fR> +.BI \-d " directory" .TQ -.B \-\-basedir <\fIdirectory\fR> +.BI \-\-basedir " directory" .br Set the base directory as a reference point to normalize paths in includes and .I incdir @@ -61,7 +85,7 @@ Print program version and exit. . .SH REFERENCE . -.PP +.LP Files processed by .B slweb are using a minimal subset of Markdown with added directives. Supported @@ -90,7 +114,7 @@ Text inside \fC`backticks`\fR will be put inside \fC<code></code>\fR (both backticks need to be on the same line). . .IP \[bu] -.BR "Blockquotes" . +.BR Blockquotes . Starting the line with \fC>\fR will surround it with a \fC<blockquote>\fR tag. Multiple lines are supported. . @@ -103,13 +127,11 @@ Special case is the form \fC[=somemacro Link title](https://anything)\fR which prepends the body of a macro .I somemacro into the \fC<a></a>\fR tag (here broken into multiple lines for clarity): -.EX -.in +4 +.CDS 8 <a href="https://anything"> <!-- contents of somemacro --> Link title</a> -.EE -.in -4 +.CDE This can, for example, be used to add .SM SVG icons to links. See @@ -117,28 +139,22 @@ icons to links. See Also, the form \fC[(Link title)](http://asite.com)\fR will surround the link title (text between \fC<a></a>\fR tags) with \fC<span></span>\fR, like so: -.EX -.in +4 +.CDS 4 <a href="http://asite.com"><span>Link title</span></a> -.EE -.in -4 +.CDE This allows for separate styling of link text. It can be combined with the macro-form: -.EX -.in +4 +.CDS 4 [=somemacro (Link title)](http://asite.com) -.EE -.in -4 +.CDE It will prepend the body of a macro .I somemacro outside of the \fC<span></span>\fR: -.EX -.in +4 +.CDS 4 <a href="http://asite.com"> <!-- contents of somemacro --> <span>Link title</span></a> -.EE -.in -4 +.CDE . .IP \[bu] .BR "Line breaks" . @@ -166,7 +182,7 @@ and you can have both a class attribute and an id attribute per tag. A variation of this is to use a special form \fC{.myclass}{/.myclass}\fR, which will be transformed into \fC<div class="myclass"></div>\fR. . -.IP \- 4 +.IP \- .BR "Id attributes" . Directive \fC{tag#myid}{/tag}\fR will be transformed into \fC<tag id="myid"></tag>\fR. Only one id attribute is permitted per tag directive @@ -185,7 +201,7 @@ Directive \fC{include "somefile"}\fR will fork, parse .IR basedir ) and output the resulting .SM HTML -as if the option \fC--body-only\fR was specified. All macros and +as if the option \fC\-\-body\-only\fR was specified. All macros and .SM YAML variables will be preserved. . @@ -207,11 +223,12 @@ and are optional) will be expanded as follows: . .RS -.IP 1. 4 +.nr list 1 1 +.IP \n[list]. 4 A \fC<ul class="incdir">\fR tag will be inserted into the document instead of the directive. . -.IP 2. 4 +.IP \n+[list]. For every subdirectory of .IR basedir , up to @@ -219,10 +236,10 @@ up to (if present) or 5 (if omitted) total subdirectories, a \fC<li>\fR tag will be inserted into the \fCul\fR tag. . -.IP 3. 4 +.IP \n+[list]. A \fC<details>\fR tag will be inserted into each \fC<li>\fR tag. . -.IP 4. 4 +.IP \n+[list]. Inside the \fC<details>\fR tag, a \fC<summary>\fR tag will be inserted with the name of the subdirectory. If .I macroname @@ -233,7 +250,7 @@ macro .SM SVG files as arrows). . -.IP 5. 4 +.IP \n+[list]. After the \fC<summary>\fR tag a \fC<div>\fR tag will be inserted into \fC<details>\fR, containing the concatenated output from processing each of the .I .slw @@ -278,8 +295,8 @@ generated by the directive. The actual values used depend on the source-level constant .IR timestamp_format . . -.IP \[bu] 4 -.BR ext-in-permalink . +.IP \[bu] +.BR ext\-in\-permalink . If set to \[lq]0\[rq], permalinks generated by the .I incdir directive will not have the extension included in the @@ -287,16 +304,16 @@ directive will not have the extension included in the attribute. For example, instead of \fCblog/2020/august.html\fR, the resulting permalink will have \fCblog/2020/august\fR. . -.IP \[bu] 4 -.BR favicon-url . +.IP \[bu] +.BR favicon\-url . if present, this .SM URL will be used as a favicon .SM URL instead of the default, \fC/favicon.ico\fR. . -.IP \[bu] 4 -.BR permalink-url . +.IP \[bu] +.BR permalink\-url . If present, this .SM URL will completely replace the link used in the @@ -311,8 +328,8 @@ provided to the .I incdir directive. . -.IP \[bu] 4 -.BR samedir-permalink . +.IP \[bu] +.BR samedir\-permalink . If set to \[lq]1\[rq], path in the permalink generated by the presence of .I date variable will be converted (with @@ -320,18 +337,18 @@ variable will be converted (with to be relative to the directory containing the input file. Otherwise, directory in the permalink will remain unchanged. . -.IP \[bu] 4 -.BR site-desc . +.IP \[bu] +.BR site\-desc . The contents of this variable will be inserted as the value of the .I content attribute of the \fC<meta name="description">\fR tag. . -.IP \[bu] 4 -.BR site-name . +.IP \[bu] +.BR site\-name . The contents of this variable will be inserted inside the \fC<title></title>\fR tags. . -.IP \[bu] 4 +.IP \[bu] .BR stylesheet . The contents of this variable will be treated as a .SM CSS @@ -342,16 +359,16 @@ declaration per .I .slw file. . -.IP \[bu] 4 +.IP \[bu] .BR title . If present, contents of this variable will be prepended to the body as a heading with the level determined by the -.I title-heading-level +.I title\-heading\-level variable, defaulting to 2. (\fCtitle: Some title\fR becomes \fC<h2>Some title</h2>\fR). . -.IP \[bu] 4 -.BR title-heading-level . +.IP \[bu] +.BR title\-heading\-level . See .BR title . . @@ -366,18 +383,16 @@ are: If present, the body of this macro will be inserted into permalinks generated by the .I incdir -directive, similar to the macro-form of links. +directive, similar to the macro\-form of links. . .SH "SEE ALSO" .BR sed (1) . .SH EXAMPLES . -.PP +.LP Given the file \fCindex.slw\fR in the current directory: -.EX -.in +4 -.sp +.CDS 4 --- site-name: Test website site-desc: My first website in slweb @@ -389,21 +404,13 @@ site-desc: My first website in slweb This is an _example_ of a statically generated HTML. {/main} -.in -4 -.sp -.EE +.CDE after using the command: -.EX -.in +4 -.sp +.CDS 4 $ slweb index.slw > index.html -.in -4 -.sp -.EE +.CDE file \fCindex.html\fR contains: -.EX -.in +4 -.sp +.CDS 4 <!DOCTYPE html> <html lang="en"> <head> @@ -423,9 +430,7 @@ file \fCindex.html\fR contains: </main> </body> </html> -.in -4 -.sp -.EE +.CDE . .SH "KNOWN LIMITATIONS" . @@ -433,58 +438,53 @@ file \fCindex.html\fR contains: Currently there is no way to determine where the paragraph inside a tag should begin and end without adding blank lines or using the \fC{p}{/p}\fR notation. For example, the code -.EX -.in +4 -.sp +. +.CDS 8 {tag} First paragraph Second paragraph {/tag} -.in -4 -.sp -.EE +.CDE +. +.IP will produce -.EX -.in +4 -.sp +. +.CDS 8 <tag> First paragraph <p>Second paragraph </tag></p> -.in -4 -.sp -.EE +.CDE +. +.IP You can suppress the paragraph starting/ending tags by prepending blank lines with a backslash, like this: -.EX -.in +4 -.sp +. +.CDS 8 {tag} First paragraph \[rs] Second paragraph {/tag} -.in -4 -.sp -.EE +.CDE +. +.IP which will produce -.EX -.in +4 -.sp +. +.CDS 8 <tag> First paragraph Second paragraph </tag> -.in -4 -.sp -.EE +.CDE +. +.IP Adding blank lines helps, if paragraphs are desired: -.EX -.in +4 -.sp +. +.CDS 8 {tag} First paragraph @@ -492,26 +492,24 @@ First paragraph Second paragraph {/tag} -.in -4 -.sp -.EE +.CDE +. +.IP will produce -.EX -.in +4 -.sp +. +.CDS 8 <tag> <p>First paragraph</p> <p>Second paragraph</p> </tag> -.in -4 -.sp -.EE +.CDE . .SH BUGS . -.PP +.LP Bugs can be reported using the Github issue tracker at: .UR https://\:github.com/\:Strahinja/\:slweb/\:issues .UE +.\" vim: set filetype=groff: