forked from github.com/blag
renamed old sg stuff to blag
This commit is contained in:
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,18 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [1.2.1] - 2018-12-30
|
## [0.0.0] - YYYY-MM-DD
|
||||||
|
|
||||||
* Fixed version
|
*
|
||||||
|
|
||||||
|
|
||||||
## [1.2.0] - 2018-12-30
|
|
||||||
|
|
||||||
* Added markdown as requirement
|
|
||||||
* Simplified Makefile
|
|
||||||
|
|
||||||
|
|
||||||
## [1.1.0] - 2018-07-14
|
|
||||||
|
|
||||||
* Added proper packaging
|
|
||||||
* made sg PEP8 compatible
|
|
||||||
* Changed license from GPL to MIT
|
|
||||||
|
|||||||
22
README.md
22
README.md
@@ -1,27 +1,11 @@
|
|||||||
# sg.py -- a small static site generator
|
# blag -- a simple, blog-aware static site generator
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ pip install sg.py
|
$ pip install blag
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Populate directory with markdown files (they have to end with
|
TBD
|
||||||
.markdown). You can also create arbitrarily nested subdirectories
|
|
||||||
containing .markdown files.
|
|
||||||
|
|
||||||
Sg will go recursively through all directories not beginning with an
|
|
||||||
underscore ("_") and convert the .markdown files into .html. The
|
|
||||||
resulting HTML files will be saved into the _site directory, conserving
|
|
||||||
the directory structure where the .markdown file was found.
|
|
||||||
|
|
||||||
Put your static content into _static. Files and subdirectories will be
|
|
||||||
copied into _site without any modifications.
|
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
* document the YAML frontmatter
|
|
||||||
* enable layout selection by _layout_foo or so
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import logging
|
|||||||
from jinja2 import Environment, ChoiceLoader, FileSystemLoader, PackageLoader
|
from jinja2 import Environment, ChoiceLoader, FileSystemLoader, PackageLoader
|
||||||
import feedgenerator
|
import feedgenerator
|
||||||
|
|
||||||
from sg.markdown import markdown_factory, convert_markdown
|
from blag.markdown import markdown_factory, convert_markdown
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
@@ -91,7 +91,7 @@ def convert_to_html(convertibles, input_dir, output_dir):
|
|||||||
env = Environment(
|
env = Environment(
|
||||||
loader=ChoiceLoader([
|
loader=ChoiceLoader([
|
||||||
FileSystemLoader(['templates']),
|
FileSystemLoader(['templates']),
|
||||||
PackageLoader('sg', 'templates'),
|
PackageLoader('blag', 'templates'),
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool:pytest]
|
[tool:pytest]
|
||||||
addopts =
|
addopts =
|
||||||
--cov=sg
|
--cov=blag
|
||||||
--cov=tests
|
--cov=tests
|
||||||
--cov-report=html
|
--cov-report=html
|
||||||
--cov-report=term-missing:skip-covered
|
--cov-report=term-missing:skip-covered
|
||||||
|
|||||||
12
setup.py
12
setup.py
@@ -4,19 +4,19 @@
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
meta = {}
|
meta = {}
|
||||||
exec(open('./sg/version.py').read(), meta)
|
exec(open('./blag/version.py').read(), meta)
|
||||||
meta['long_description'] = open('./README.md').read()
|
meta['long_description'] = open('./README.md').read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='blag',
|
name='blag',
|
||||||
version=meta['__VERSION__'],
|
version=meta['__VERSION__'],
|
||||||
description='Simple static site generator.',
|
description='simple blog-aware static site generator',
|
||||||
long_description=meta['long_description'],
|
long_description=meta['long_description'],
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
keywords='markdown site generator cli',
|
keywords='markdown blag blog static site generator cli',
|
||||||
author='Bastian Venthur',
|
author='Bastian Venthur',
|
||||||
author_email='mail@venthur.de',
|
author_email='mail@venthur.de',
|
||||||
url='https://github.com/venthur/sg',
|
url='https://github.com/venthur/blag',
|
||||||
python_requires='>=3',
|
python_requires='>=3',
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'markdown',
|
'markdown',
|
||||||
@@ -24,10 +24,10 @@ setup(
|
|||||||
'jinja2',
|
'jinja2',
|
||||||
'pygments',
|
'pygments',
|
||||||
],
|
],
|
||||||
packages=['sg'],
|
packages=['blag'],
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'sg = sg.sg:main'
|
'blag = blag.blag:main'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
license='MIT',
|
license='MIT',
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from datetime import datetime
|
|||||||
import pytest
|
import pytest
|
||||||
import markdown
|
import markdown
|
||||||
|
|
||||||
from sg.markdown import convert_markdown, markdown_factory
|
from blag.markdown import convert_markdown, markdown_factory
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("input_, expected", [
|
@pytest.mark.parametrize("input_, expected", [
|
||||||
|
|||||||
Reference in New Issue
Block a user