Skip to content

Commit

Permalink
Merge pull request #18 from mdrachuk/readme
Browse files Browse the repository at this point in the history
Fill the README
  • Loading branch information
mdrachuk committed Aug 27, 2019
2 parents 1cb8fd3 + 0fbbdc1 commit 8ac7b06
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,48 @@ Static site generator i actually can use.


## Features
TBD
- [x] Clean and easily extensible API
- [x] Jinja2 templates
- [x] Markdown rendering
- [ ] Markdown links
- [x] Sass/SCSS rendering
- [ ] RSS/Atom feeds
- [ ] Dev server

## Basics
### Installation
## Installation
Available from [PyPI][pypi]:
```shell
pip install lightweight
```

### Quick Example
TBD
## Quick Example
```python
from lightweight import Site, markdown, paths, render, template, sass


def blog_posts():
post_template = template('blog-post.html')
# Use globs to select files.
return (markdown(path, post_template) for path in paths('blog/**.md'))


site = Site()

# Render a Jinja2 template.
site.include('index.html', render('index.html'))

# Render list of Markdown files.
[site.include(f'posts/{post.file.name}.html', post) for post in blog_posts()]

# Render SCSS.
site.include('static/css/style.css', sass('static/scss/lightweight.scss'))

# Include a copy of a directory.
site.include('static/img')

# Execute all included content.
site.render()
```

[pypi]: https://pypi.org/project/lightweight/
[docs]: https://lightweight.readthedocs.io/en/latest/
2 changes: 1 addition & 1 deletion lightweight/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from .files import paths
from .template import template

__version__ = '0.1.0.dev12'
__version__ = '0.1.0.dev13'

0 comments on commit 8ac7b06

Please sign in to comment.