diff --git a/CHANGELOG.md b/CHANGELOG.md index 2da4852..a19bdc2 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/README.md b/README.md index efd286c..10dbb24 100644 --- a/README.md +++ b/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 diff --git a/sg/__init__.py b/blag/__init__.py similarity index 100% rename from sg/__init__.py rename to blag/__init__.py diff --git a/sg/sg.py b/blag/blag.py similarity index 97% rename from sg/sg.py rename to blag/blag.py index a273ea7..1bcc7c3 100644 --- a/sg/sg.py +++ b/blag/blag.py @@ -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'), ]) ) diff --git a/sg/markdown.py b/blag/markdown.py similarity index 100% rename from sg/markdown.py rename to blag/markdown.py diff --git a/sg/templates/archive.html b/blag/templates/archive.html similarity index 100% rename from sg/templates/archive.html rename to blag/templates/archive.html diff --git a/sg/templates/article.html b/blag/templates/article.html similarity index 100% rename from sg/templates/article.html rename to blag/templates/article.html diff --git a/sg/version.py b/blag/version.py similarity index 100% rename from sg/version.py rename to blag/version.py diff --git a/setup.cfg b/setup.cfg index dcf0ae2..b99f230 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [tool:pytest] addopts = - --cov=sg + --cov=blag --cov=tests --cov-report=html --cov-report=term-missing:skip-covered diff --git a/setup.py b/setup.py index 8ff57ca..c0d74e9 100644 --- a/setup.py +++ b/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', diff --git a/tests/test_sg.py b/tests/test_blag.py similarity index 100% rename from tests/test_sg.py rename to tests/test_blag.py diff --git a/tests/test_markdown.py b/tests/test_markdown.py index dd32a15..58edd8f 100644 --- a/tests/test_markdown.py +++ b/tests/test_markdown.py @@ -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", [