mirror of
https://github.com/venthur/blag.git
synced 2025-11-25 20:52:43 +00:00
renamed old sg stuff to blag
This commit is contained in:
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,18 +1,6 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
$ pip install sg.py
|
||||
$ pip install blag
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Populate directory with markdown files (they have to end with
|
||||
.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
|
||||
TBD
|
||||
|
||||
@@ -16,7 +16,7 @@ import logging
|
||||
from jinja2 import Environment, ChoiceLoader, FileSystemLoader, PackageLoader
|
||||
import feedgenerator
|
||||
|
||||
from sg.markdown import markdown_factory, convert_markdown
|
||||
from blag.markdown import markdown_factory, convert_markdown
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(
|
||||
@@ -91,7 +91,7 @@ def convert_to_html(convertibles, input_dir, output_dir):
|
||||
env = Environment(
|
||||
loader=ChoiceLoader([
|
||||
FileSystemLoader(['templates']),
|
||||
PackageLoader('sg', 'templates'),
|
||||
PackageLoader('blag', 'templates'),
|
||||
])
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool:pytest]
|
||||
addopts =
|
||||
--cov=sg
|
||||
--cov=blag
|
||||
--cov=tests
|
||||
--cov-report=html
|
||||
--cov-report=term-missing:skip-covered
|
||||
|
||||
12
setup.py
12
setup.py
@@ -4,19 +4,19 @@
|
||||
from setuptools import setup
|
||||
|
||||
meta = {}
|
||||
exec(open('./sg/version.py').read(), meta)
|
||||
exec(open('./blag/version.py').read(), meta)
|
||||
meta['long_description'] = open('./README.md').read()
|
||||
|
||||
setup(
|
||||
name='blag',
|
||||
version=meta['__VERSION__'],
|
||||
description='Simple static site generator.',
|
||||
description='simple blog-aware static site generator',
|
||||
long_description=meta['long_description'],
|
||||
long_description_content_type='text/markdown',
|
||||
keywords='markdown site generator cli',
|
||||
keywords='markdown blag blog static site generator cli',
|
||||
author='Bastian Venthur',
|
||||
author_email='mail@venthur.de',
|
||||
url='https://github.com/venthur/sg',
|
||||
url='https://github.com/venthur/blag',
|
||||
python_requires='>=3',
|
||||
install_requires=[
|
||||
'markdown',
|
||||
@@ -24,10 +24,10 @@ setup(
|
||||
'jinja2',
|
||||
'pygments',
|
||||
],
|
||||
packages=['sg'],
|
||||
packages=['blag'],
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'sg = sg.sg:main'
|
||||
'blag = blag.blag:main'
|
||||
]
|
||||
},
|
||||
license='MIT',
|
||||
|
||||
@@ -3,7 +3,7 @@ from datetime import datetime
|
||||
import pytest
|
||||
import markdown
|
||||
|
||||
from sg.markdown import convert_markdown, markdown_factory
|
||||
from blag.markdown import convert_markdown, markdown_factory
|
||||
|
||||
|
||||
@pytest.mark.parametrize("input_, expected", [
|
||||
|
||||
Reference in New Issue
Block a user