diff --git a/README.md b/README.md index ac971df..d246797 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ there should be an HTML [jinja2 template](https://jinja.palletsprojects.com/en/2 If not the `templates/default.html` will be used to render the pages under that Category. +**CSS/JS files** are stored in `static/`. See `templates/default.html` to see how it links to `static/archive.css` --- diff --git a/dumpwiki.py b/dumpwiki.py index 2e83c53..a3dc706 100644 --- a/dumpwiki.py +++ b/dumpwiki.py @@ -19,7 +19,7 @@ p.add_argument("--one", default=False, action="store_true", help="Output one pag p.add_argument("--local", default=False, action="store_true", help="When creating a local archives. Add full URL to images") args = p.parse_args() - +print(args) # site and login site = Site(host=args.host, path=args.path) @@ -83,7 +83,11 @@ for cat in publish.members(): print(p) htmlsrc = site.parse(page=p.name)['text']['*'] htmlsrc = rewritelinks(htmlsrc) - html = template.render(page=p, body=htmlsrc) + if args.local is True: + html = template.render(page=p, body=htmlsrc, staticpath='..') + else: + html = template.render(page=p, body=htmlsrc, staticpath='0') + with open(os.path.join(args.output, filenameforpage(p)), 'w') as f: print(html, file=f) if args.one: diff --git a/static/archive.css b/static/archive.css index e69de29..6e681c2 100644 --- a/static/archive.css +++ b/static/archive.css @@ -0,0 +1,8 @@ +body { + background-color: #aaa4a0; +} + +a, a:visited{ + color:black; + text-decoration: underline; +} \ No newline at end of file diff --git a/templates/default.html b/templates/default.html index e6c9cbf..a542842 100644 --- a/templates/default.html +++ b/templates/default.html @@ -2,8 +2,8 @@
- - + +