Skip to content
Snippets Groups Projects
Commit 601a848d authored by micressor's avatar micressor
Browse files

Add build.py to generate pages and validate ATOM feed

parent 50b0c8ab
No related branches found
No related tags found
1 merge request!24Feature hugo migration
......@@ -19,7 +19,7 @@ hugo server -D --enableGitInfo
Generate static hugo pages:
```
hugo --enableGitInfo
./build.py
```
## Content Types
......
build.py 0 → 100755
#!/usr/bin/python
import os
import sys
import requests
os.system('hugo --enableGitInfo --cleanDestinationDir')
exit = 0
url = 'https://validator.w3.org/feed/check.cgi'
payload = {'url': 'https://briarproject.org/index.xml'}
r = requests.get(url, params=payload)
if "This is a valid Atom 1.0 feed" not in r.content:
print "ATOM feed is not valid."
exit = 1
else:
print "-- This is a valid Atom 1.0 feed -- %s" % payload.get('url')
#print r.content
sys.exit(exit)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment