Podlite Quick Tour
Introduction
Podlite is a lightweight markup language that's easy to learn and use. This quick tour will show you the most common features through practical examples.
Basic Structure
Headings
Headings are created using =head1
, =head2
, etc. The number indicates the heading level:
Paragraphs
Regular paragraphs are created by simply writing text. No special markers are needed:
Text Formatting
Basic Formatting
Special Characters
Use E<>
for special characters:
Lists
Unordered Lists
Create bullet points using =item
:
Ordered Lists
Add :numbered
to create numbered lists:
Code Blocks
Show code examples using =code
:
JavaScript example:
=begin code :lang<js> export function add(x, y = 0) { return x + y; } =end code
Rendered JavaScript example:
export function add(x, y = 0) { return x + y; }
Python example:
=begin code :lang<python> def fib(n): # write Fibonacci series up to n """Print a Fibonacci series up to n.""" a, b = 0, 1 while a < n: print(a, end=' ') a, b = b, a+b print() # Now call the function we just defined: fib(2000) =end code
Rendered Python example:
def fib(n): # write Fibonacci series up to n """Print a Fibonacci series up to n.""" a, b = 0, 1 while a < n: print(a, end=' ') a, b = b, a+b print() # Now call the function we just defined: fib(2000)
Ruby example:
=begin code :lang<ruby> class Person def initialize(name) @name = name end def greet puts "Hello, I'm #{@name}!" end end person = Person.new("Alice") person.greet =end code
Rendered Ruby example:
class Person def initialize(name) @name = name end def greet puts "Hello, I'm #{@name}!" end end person = Person.new("Alice") person.greet
Perl example:
=begin code :lang<perl> package Calculator; sub new { my $class = shift; return bless {}, $class; } sub add { my ($self, $x, $y) = @_; return $x + $y; } my $calc = Calculator->new(); print $calc->add(5, 3) . "\n"; =end code
Rendered Perl example:
package Calculator; sub new { my $class = shift; return bless {}, $class; } sub add { my ($self, $x, $y) = @_; return $x + $y; } my $calc = Calculator->new(); print $calc->add(5, 3) . "\n";
Raku example:
=begin code :lang<raku> sub greet($name) { say "Hello, $name!"; } =end code
Rendered Raku example:
sub greet($name) { say "Hello, $name!"; }
and many more ...
Links
Create links using L<>
:
Description | Schema | Example |
---|---|---|
Web URLs | https: | L<Podlite|https://podlite.org> |
Local system files | file: | L<config|file:/usr/local/lib/.configrc> |
Email addresses | mailto: | L<Support|mailto:support@example.com> |
System manual pages | man: | L<find command|man:find(1)> |
Document semantic blocks | doc: | L<Introduction|doc:#introduction> |
Links to definitions | defn: | L<API|defn:application-programming-interface> |
Book ISBN identifiers | isbn: | L<Linear Algebra|isbn:978-0321385178> |
Serial publication identifiers | issn: | L<UX Design Magazine|issn:1234-5678> |
Common examples:
Images
Insert images using =picture
:
Tables
Create tables using =table
:
Notifications
Create attention-grabbing blocks using =nested
with :notify
:
Mathematical Formulas
Include mathematical formulas using =formula
and markup code F<>
:
Markdown Integration Demo
Now let's see how Markdown works inside Podlite, including formulas and diagram
Best Practices
Next Steps
Now that you've seen the basics, you can:
Read the full specification for complete details
Try creating your own Podlite documents
Explore more advanced features as needed