NakamotoInstitute.org was written in Flask.
-
Install python3 and virtualenv
-
Copy
config.py.envtoconfig.py -
Update the domain assigned to
SERVER_NAMEinconfig.pyif you would like to change "sni" -
If you are running the app locally, change
FLASK_DEBUGinconfig.pytoTruein order to enable reloading of the server on code changes. -
Update your /etc/hosts file (replace
sniwith the value from step 3 if you changed it):
127.0.0.1 localhost
127.0.0.1 sni
127.0.0.1 satoshi.sni
-
Download the PDFs and txts here and place them in
sni/static/docs -
Set up a virtualenv with
virtualenv -p python3 --no-site-packages venvand. venv/bin/activate -
Install the dependencies using
pip install -r requirements.txt. -
Run
mkdir tmp -
Run
./dataimport.py update. The db will be cleared and re-populated each time you do this. You can use the flags--content, and--skepticto repopulate only models associated with the blog, the docs, and research docs, or skeptics, respectively. -
Run
./run.py runserverand navigate tosni:5000in your browser.
- Add proper markdown front matter:
translated_title: # Name of title in local language
translation_url: # Original URL for translation (optional)
translation_publication: # Name of original publication hosting translation (optional)
translation_publication_url: # URL of original publication hosting translation (optional)
- Place the markdown file in
sni/templates/blogwith the filename<slug>-<language ietf code>.md(e.g.speculative-attack-es.md). - If you are a new translator, add your name and URL (i.e. website, Twitter, etc.) to
data/translators.json. - Update
data/blogposts.json:
"translations": {
"<local language code>": ["<translator name"]
}
Note: the name must match that in translators.json exactly.
- If you are submitting a new language, add it to
data/languages.json.
- Format the HTML literature templates
- Adjust the CSS and HTML to improve readability and navigation
- Write tests for the Python code
- Submit translations of website content (literature translations coming soon!)
NakamotoInstitute.org is under the GNU Affero License.