{"id":16711227,"url":"https://github.com/regisb/prodigal","last_synced_at":"2025-04-10T05:36:35.261Z","repository":{"id":12004500,"uuid":"14584157","full_name":"regisb/prodigal","owner":"regisb","description":"A multi-language static website generator","archived":false,"fork":false,"pushed_at":"2016-12-22T09:03:09.000Z","size":43,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T06:54:36.044Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/regisb.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-21T10:10:30.000Z","updated_at":"2022-12-07T16:12:42.000Z","dependencies_parsed_at":"2022-09-24T09:32:51.171Z","dependency_job_id":null,"html_url":"https://github.com/regisb/prodigal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regisb%2Fprodigal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regisb%2Fprodigal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regisb%2Fprodigal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regisb%2Fprodigal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/regisb","download_url":"https://codeload.github.com/regisb/prodigal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248164500,"owners_count":21058155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T20:11:15.728Z","updated_at":"2025-04-10T05:36:35.215Z","avatar_url":"https://github.com/regisb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==============================================\nProdigal: Yet Another Static Website Generator\n==============================================\n\nAbout\n=====\n\nProdigal is a static website generator written in Python. You can use it to\ngenerate static websites based on Jinja2 templates. Prodigal handles website\ntranslations natively: this means that you can use Prodigal to generate\nmultiple versions of your website, one for each language.\n\nInstalling\n==========\n\n::\n\n    pip install -e git+https://github.com/regisb/prodigal.git#egg=prodigal\n\nUsage\n=====\n\nProdigal generates content from Jinja2 templates. Content generation should proceed as follows:\n\n1. Write your html/jinja2 content in src/\n2. Generate a translation file in the target language::\n\n    prodigal translate fr src/\n\n3. Edit the generated src/fr.po file in order to produce translations for all your localized strings.\n4. Generate the localized version of your content::\n\n    prodigal generate -l fr src/ dst/\n\nWhile you are developing your website, you might want to skip the generation\nstep and see directly what your website looks like. Prodigal comes with an\nembedded HTTP server which can serve your content from your source folder::\n\n    prodigal serve -l fr src/\n\nExample\n=======\n\nConsider the following content::\n\n    example/\n        _base.html\n        blog/\n            post1.html\n            post2.html\n\n_base.html::\n\n    \u003c!DOCTYPE html\u003e\n    \u003chtml\u003e\n        \u003cbody\u003e{% block content %}{% endblock %}\u003c/body\u003e\n    \u003c/html\u003e\n\nblog/post1.html::\n\n    {% extends \"_base.html\" %}\n    {% block content %}Hey, check it out! I just wrote a great blog post.{% endblock %}\n\nblog/post2.html::\n\n    \u003chtml\u003e\n        \u003cbody\u003e{% trans %}Some entirely different (translated) content.{% endtrans %}\u003c/body\u003e\n    \u003c/html\u003e\n\nYou can first generate the French translation file for this website::\n\n    prodigal translate example/ fr\n\nThis command generated the file `example/fr.po`. You may now edit it in order\nto provide the correct French translation for your content::\n\n    #: ./example/post2.html:2\n    msgid \"Some entirely different (translated) content.\"\n    msgstr \"Un peu de contenu (traduit) complètement différent\"\n\nAnd finally, you can use this translation file to deploy a translated version of your website::\n\n    prodigal generate -l fr ./example /var/www/\n\nIn further iterations, you can serve your content directly from your source\nfolder thanks to the embedded HTTP server::\n    \n    prodigal serve -l fr ./example\n\nThen head to http://127.0.0.1:8000 in your browser to see your rendered\ntemplates. Note that translations will be recompiled on-the-fly as you modify\nyour .po file.\n   \nDevelopment\n===========\n\nInstall development dependencies::\n\n    pip install -r requirements.txt\n\nIf you wish to write a contribution, don't forget to write unit tests! Tests can be run with::\n\n    python -m unittest discover\n\n\nF.A.Q\n=====\n\nQuestions? Comments? Just open an issue request, tweet me at\n`@regisb \u003chttps://twitter.com/#!/regisb\u003e`_, or shoot me an email at\n`prodigal@behmo.com \u003cmailto:prodigal@behmo.com\u003e`_.\n\nQ. There are so many static website generators already, why did you create\nanother one?\n\nA. None of the static website generators I found allowed me to generate two\nversions of the same website in two different languages. I needed to do that\nfor `nulinu.li \u003chttp://nulinu.li\u003e`_. I figured: how hard can it be? Existing\nbricks where already present in Django, I only had to pull them out.\n\nQ. How can I list recent blog posts by title?\n\nA. This is a frequent use case, so I included it in the example website located\nat example/. Basically, you need to list your blog posts in the _config.html\nfile, which is rendered before all other templates and allows you to define\ncustom variables to be used later in other templates. Then, you can list your\nblog posts using the `{{ 5|latest_pages }}` command in your templates.\n\nQ. Non-html files are not copied when I generate my website!\n\nA. The rendering engine of Prodigal renders only `*.html` files. If there is\nnon-html content that you wish to include in your website, such as CSS,\nJavascript or image assets, you need to list them using the `{{ add_media }}`\ncommand. E.g: see the `example/_config.html` file.\n\n\n\n    \"Occasionally, members of the Institute of Arcane Study acquire a taste for\n    worldly pleasures. Seldom do they have trouble finding employment.\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregisb%2Fprodigal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fregisb%2Fprodigal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregisb%2Fprodigal/lists"}