-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from anlutro/develop
changes for 0.6
- Loading branch information
Showing
10 changed files
with
172 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os.path | ||
import logging | ||
import sass | ||
import russell | ||
|
||
root_path = os.path.dirname(__file__) | ||
args = russell.get_cli_args() | ||
logging.basicConfig( | ||
level=logging.DEBUG if args.verbose else logging.INFO, | ||
format="%(asctime)s %(levelname)8s [%(name)s] %(message)s", | ||
) | ||
blog = russell.BlogEngine( | ||
root_path=root_path, | ||
root_url=args.root_url or "//localhost", | ||
site_title="Russell example", | ||
site_desc=("An example Russell site."), | ||
) | ||
|
||
# add content | ||
blog.add_pages() | ||
blog.add_posts() | ||
|
||
|
||
def generate(): | ||
# copy and generate assets | ||
blog.copy_assets() | ||
blog.write_file( | ||
"assets/style.css", | ||
sass.compile(filename=os.path.join(blog.root_path, "style.sass")), | ||
) | ||
blog.add_asset_hashes() | ||
|
||
# generate HTML pages | ||
blog.generate_index(num_posts=3) | ||
blog.generate_archive() | ||
blog.generate_pages() | ||
blog.generate_posts() | ||
blog.generate_tags() | ||
|
||
# generate other stuff | ||
blog.generate_sitemap(https=False) | ||
blog.generate_rss() | ||
blog.write_file("robots.txt", "User-agent: *\nDisallow:\n") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from .__version__ import __version__ | ||
from russell.engine import BlogEngine | ||
from russell.cli import get_args as get_cli_args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.5.10" | ||
__version__ = "0.6.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters