{ "info": { "author": "Cole Krumbholz, Lauri Hynynen", "author_email": "team@brace.io", "bugtrack_url": null, "classifiers": [], "description": "Brace Tags\n==========\n\n> The simplest static site generator\n\nBrace Tags is a static site generator focused on simplicity. It does one thing:\nsolves the problem of having to repeat the same HTML code on several web pages.\n(In other words, it provides \"partials\")\n\nThe template language provided by Brace Tags has only two tags, `include` and\n`is`.\n\n\n## Static site generation 101\n\nYou can use Brace Tags to build a multi-page static website without\nduplicating navigation or footer code. Here's generally how it works:\n\n1. Find duplicated code snippets in your HTML files. Extract them into separate\nfiles called \"partials\".\n\n2. Replace each duplicated code snippet with a special placeholder tag. The tag\nlooks like: `{% include mypartial.html %}`. This is where the content from a\npartial will be injected.\n\n3. Run the `tags build` command to assemble the website from your source code.\nYou can put the generated site online using any static site hosting provider.\n\n\n## An example Brace Tags website\n\nHere's a simple multi-page website with `index.html` and `about.html` files. We\ncan add the main navigation into each page with the `include` tag.\n\nindex.html:\n\n \n \n {% include nav.html %} \n Welcome to Brace Tags!\n \n \n\n\nabout.html:\n\n \n \n {% include nav.html %}\n Brace Tags is very simple!\n \n \n\nThe `is` tag is used to change the content of a partial based on the file that's\ncurrently being generated. You can use this, for example, to highlight the\ncurrent page in the nav partial.\n\nnav.html:\n\n \n\nNote: you'll need to define CSS styles separately to take advantage of the\n`active` class attribute used above.\n\n## Installing Brace Tags\n\nBrace Tags requires Python. Many computers today come with Python pre-installed,\nincluding all macbooks. If you have Python, you can install Brace Tags with\n`easy_install` by opening up your terminal and typing in:\n\n sudo easy_install brace-tags\n\n(The sudo part will ask you to provide a password. It's required because Brace\nTags needs to install the `tags` command line script.)\n\nBrace has one external dependency, `watchdog` which is only required if you want\nto use Brace to monitor a folder for changes, and recompile your site on the\nfly. Before using the `--watch` option you'll need to install `watchdog` with\n`sudo easy_install watchdog`.\n\n\n## Using Brace Tags\n\nTags has two commands, the `build` command and the `serve` command. Build is\nused to generate a site from a source folder.\n\n tags build\n\nBy default, Brace Tags compiles all the .html files in your site. Tags places\nthe generated site in the `_site` folder, and ignores those files during future\nbuilds. \n\nOnce built, the `serve` command will start a local webserver that you can use\nto view the website locally with your browser. This is for testing only.\n\n tags serve\n\nFor more options and explanation, check out the help:\n\n tags --help\n\n## Hosting your static site\n\nOnce you've generated a static site with Brace Tags, you can deploy it to any\nstatic site host. Github pages and S3 are just a couple of the many options. \n\nOf course we'd love for you host your site with us, on\n[Brace](http://brace.io)!\n\n## Advanced: Extending Brace Tags\n\nIf you're a python programmer, you can add your own tags to implement custom\nfunctionality on top of Brace Tags.\n\nCustom tags should look like this:\n\n {% mytag argument1 argument2 %}\n\nOptionally, a tag can have a body, like this:\n\n {% mytag %}\n Tag Body\n {% endmytag %}\n\nEach time Brace Tags encounters a tag in an input file it checks for a\ncorresponding tag function. If the function exists, it is called and the result\nis substituted in the output.\n\nIn the `/tags/tags.py` file you'll find a function for each template tag. Add\nyour custom tag functions to that file. They should look something like this:\n\n lang = TemplateLanguage()\n\n @lang.add_tag\n def print3x(style, body=u'', context={}):\n ''' A tag that appends 3 copies of its body '''\n result = body + body + body\n if style == \"bold\":\n result = u'' + result + u''\n return result\n\nThe above function creates a print3x tag that can be used like this:\n\n {% print3x bold %}\n

ROBOTS, MAKE MY HTML!

\n {% endprint3x %}\n \nWhen adding a new tag function, here are some things you should know:\n\n- The `add_tag` decorator adds the tag function to the template language.\n\n- The tag's name is taken from the function's name. Optionally you can use the\n`add_tag_with_name` decorator to supply a tag name.\n\n- The positional arguments of the function define the tag's required arguments.\nIn the above case, the print3x tag requires one argument, a `style`.\n\n- If you specify a `body` keyword argument, then the tag will require a body.\nThe body is the content between the opening tag and an end tag.\n\n- All tag functions must accept a `context` keyword argument. This is a\ndictionary containing contextual data passed in by the generator. By default,\ncontext includes a `filename` key whose value is the file currently being\ngenerated.\n\n\nYou can also define tags that accept a variable argument list like so:\n\n @lang.add_tag\n def whatever(*args, **kwargs):\n return str(len(args))\n\n\nWhen called, the `*args` parameter will contain the variable argument list, and\nthe `body` and `context` keyword args will be in the `**kwargs` dictionary.\n\n### Using your modified version of Brace Tags\n\nYou can install your fork of Tags by first uninstalling the stock version...\n\n pip uninstall brace-tags\n\nAnd then installing your modified version:\n\n pip install -e path/to/your/brace-tags/folder\n\nYou don't need to reinstall this package after making changes. The package will\nstay up-to-date automatically.\n\n\n## Compatibility\n\nWorks with python 2.6, 2.7 and now 3.3 thanks to pyarnold.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "LICENSE", "maintainer": null, "maintainer_email": null, "name": "brace-tags", "package_url": "https://pypi.org/project/brace-tags/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/brace-tags/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/brace-tags/1.0.10/", "requires_dist": null, "requires_python": null, "summary": "The simplest static site generator", "version": "1.0.10" }, "last_serial": 1128343, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "598435bf085137099c8cf9a17fc1e250", "sha256": "53eb7028cfeddd1e0118017ff50ef2f875f457f98ddac6ddd88e00aa6cf91adc" }, "downloads": -1, "filename": "brace-tags-1.0.0.tar.gz", "has_sig": false, "md5_digest": "598435bf085137099c8cf9a17fc1e250", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7904, "upload_time": "2014-03-18T00:01:22", "url": "https://files.pythonhosted.org/packages/fa/17/c3d7c3d6184b36f7492d1d76765aa2b3b53c1b0c5f4d7c1dc0bf6ec234ec/brace-tags-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "63eaa4cfefd1685b48cd2d847904caa6", "sha256": "2e300ded81940c5096a27505b33a12d75cf9eb9657eb43cdf392a6d7ab88385c" }, "downloads": -1, "filename": "brace-tags-1.0.1.tar.gz", "has_sig": false, "md5_digest": "63eaa4cfefd1685b48cd2d847904caa6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7936, "upload_time": "2014-03-18T00:06:01", "url": "https://files.pythonhosted.org/packages/e9/77/ce9f4af990e2f3d70bdedaa40112a1740100a1b5c321a943909b0f7e5d47/brace-tags-1.0.1.tar.gz" } ], "1.0.10": [ { "comment_text": "", "digests": { "md5": "b4d02e4488d638b9713ed0c5154bcf7f", "sha256": "acec483ca313d8826ba59738bc26279a8b29cd557e0768a0974e11bd69d60a7d" }, "downloads": -1, "filename": "brace-tags-1.0.10.tar.gz", "has_sig": false, "md5_digest": "b4d02e4488d638b9713ed0c5154bcf7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10604, "upload_time": "2014-06-18T01:03:54", "url": "https://files.pythonhosted.org/packages/20/20/166a80b07a7c9b22d6e95c8a459beb56e1b953331830e51cd915620f5ef5/brace-tags-1.0.10.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "31945d122911b182a389a86e891f2dc6", "sha256": "6e70ffe128a5b13a323ab6c6e979eed5be182e4eb491eaa758407cd5219df966" }, "downloads": -1, "filename": "brace-tags-1.0.2.tar.gz", "has_sig": false, "md5_digest": "31945d122911b182a389a86e891f2dc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8957, "upload_time": "2014-03-18T00:07:56", "url": "https://files.pythonhosted.org/packages/6e/2d/341748dd019919fca1219c9f97ce65b29989cfd38a23c1360b7354c79809/brace-tags-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "039c945122273441bc361fa59be714b0", "sha256": "bbb4c4241e6c73613c23426ee1c1cc4d01ca62b3f03420c1b05137ac30bbaf0d" }, "downloads": -1, "filename": "brace-tags-1.0.3.tar.gz", "has_sig": false, "md5_digest": "039c945122273441bc361fa59be714b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9271, "upload_time": "2014-03-18T01:09:17", "url": "https://files.pythonhosted.org/packages/22/88/06ac5e1055c1209d6cecf215c16b2a4478095b6365b9aad492051aa7ca77/brace-tags-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "745f59b2393e83af44b59572e703967f", "sha256": "59abfda655024d0a0631e1678aee242aa72c6127ac098616bb2a9b3f863ec906" }, "downloads": -1, "filename": "brace-tags-1.0.4.tar.gz", "has_sig": false, "md5_digest": "745f59b2393e83af44b59572e703967f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9280, "upload_time": "2014-03-18T04:49:52", "url": "https://files.pythonhosted.org/packages/60/07/068762ffdd7754a47c6b5118dee6cd214963b85ac8c24ef44ce7cad329d9/brace-tags-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "506afaeb07783984351a97e744ca644e", "sha256": "9f87d1b715ee6251f3dbad6fd3e0d9195109a42852d4d04ee96880530cbae972" }, "downloads": -1, "filename": "brace-tags-1.0.5.tar.gz", "has_sig": false, "md5_digest": "506afaeb07783984351a97e744ca644e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9947, "upload_time": "2014-03-18T07:10:34", "url": "https://files.pythonhosted.org/packages/26/b5/df0c4fa2ae2c84ea5d7824d2e5e905850b3a584c11893271b30347e908c8/brace-tags-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "19c5b03c9cdba041ce473bcdba0dea4d", "sha256": "bcdf812a2c862786f3a112e6b58bf257ff15b0351ff2659c792c9a52a988932d" }, "downloads": -1, "filename": "brace-tags-1.0.6.tar.gz", "has_sig": false, "md5_digest": "19c5b03c9cdba041ce473bcdba0dea4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10414, "upload_time": "2014-03-19T15:29:19", "url": "https://files.pythonhosted.org/packages/03/ab/475f8e417fc03f506daa4fd833d73f83ab7553e92b2f1f1439ae867e2c5d/brace-tags-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "e75bc24bce613aea674f4f86431ea944", "sha256": "1ffcbf68a0d7e0faa2fa4559338a89df023cbb981ec49468d03e49b32556f158" }, "downloads": -1, "filename": "brace-tags-1.0.7.tar.gz", "has_sig": false, "md5_digest": "e75bc24bce613aea674f4f86431ea944", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10432, "upload_time": "2014-03-19T18:28:38", "url": "https://files.pythonhosted.org/packages/16/27/8f66b241888892985f34e545ae708d02bd341cf243a478fba791db21382f/brace-tags-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "86ef6621fb872248931a323991de7b26", "sha256": "8ab9fc76d28d179c7e1845e7f11650635e7112a6c11a309edf5ff9b08b4f2d4c" }, "downloads": -1, "filename": "brace-tags-1.0.8.tar.gz", "has_sig": false, "md5_digest": "86ef6621fb872248931a323991de7b26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10483, "upload_time": "2014-03-24T05:12:03", "url": "https://files.pythonhosted.org/packages/07/54/fdcc10ef6b486243b5bd0242804b76b696c32322e7b46e4f8a0850350540/brace-tags-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "80719d319b512293f99eab110362d6a0", "sha256": "602d48e4e6a944d8ed22bbc72d2587ee2ebcf7214f63f29448cbf835c344fb4f" }, "downloads": -1, "filename": "brace-tags-1.0.9.tar.gz", "has_sig": false, "md5_digest": "80719d319b512293f99eab110362d6a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10570, "upload_time": "2014-06-18T00:32:45", "url": "https://files.pythonhosted.org/packages/92/85/f527de15e6a2e3b496ccff5de63a3d4769c3daf215a5565058988c56f94d/brace-tags-1.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4d02e4488d638b9713ed0c5154bcf7f", "sha256": "acec483ca313d8826ba59738bc26279a8b29cd557e0768a0974e11bd69d60a7d" }, "downloads": -1, "filename": "brace-tags-1.0.10.tar.gz", "has_sig": false, "md5_digest": "b4d02e4488d638b9713ed0c5154bcf7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10604, "upload_time": "2014-06-18T01:03:54", "url": "https://files.pythonhosted.org/packages/20/20/166a80b07a7c9b22d6e95c8a459beb56e1b953331830e51cd915620f5ef5/brace-tags-1.0.10.tar.gz" } ] }