{ "info": { "author": "Andr\u00e9s", "author_email": "andres+cvs@camilion.eu", "bugtrack_url": null, "classifiers": [ "Environment :: Plugins", "Environment :: Web Environment", "Framework :: Lektor", "License :: OSI Approved :: MIT License" ], "description": "# `lektor-git-src-publisher`\n\n[Lektor][lektor]'s wonderful interface enables non-technical users to modify\nthe source of a Lektor-based site and publish the resulting website.\n\nHowever, if such source code is managed with git, the user will still have to\nfiddle around with git clients or interfaces in order collaborate with others.\n\nThis simple plugin enables two publish targets, one to update the page's\nsource code from a remote, and one to update the remote with the local\nchanges.\n\n\n## Using this\n\n\n### Steps\n\n0. Setup the `REMOTE` and its authentication (out of scope for this plugin)\n1. Install `lektor-git-src-publisher`\n2. Add the publishers to the project\n3. `lektor serve` and profit!\n\n\n### Details\n\nIn order to install the plugin you can add following to your `.lektorproject`\nfile:\n\n [packages]\n lektor-git-src-publisher = 0.1\n\nOr follow the [official plugin instructions][lektorplugins].\n\nIn order to enable the publishers, you also modify your `.lektorproject` file:\n\n [servers.update]\n name = Update from Remote\n enabled = yes\n target = gitsrc-forcepull://master\n\n [servers.push]\n name = Push to Remote\n enabled = yes\n target = gitsrc-push://master\n\nNotice that this plugin registers the `gitsrc-forcepull://BRANCH` and\n`gitsrc-push://BRANCH` schemas.\n\nIt is conceivable to have multiple publishers, e.g. one for a `staging` and\none for a `master` branch. See the [limitations](#limitations).\n\n\n\n## Getting in touch / collaborating\n\nIf you just want to say hi/thanks or ask something, we are on [Matrix][matrix]!\nGet in touch with us at [#oss:camilion.eu][matrixosscml] or through\nour website: [https://camilion.eu][camilion].\n\nIf you have an issue with this plugin [open an Issue][gspissues].\n\nIf you have an improvement you'd like to have shipped with this plugin,\neither get in touch with us, or open an Issue or a Pull Request.\n\nWe mirror the code to GitHub from our infra, so PRs from any other code\nhosting platforms are very welcome as well.\n\nA special mention goes to our friends at [ungleich][ungleich], who\nalso needed this and provided the feedback and motivation needed to push\nthis forward.\n\n\n## Limitations\n\nDue to the way this is done, the Lektor server can be confused if you change\nthe `.lektorproject` too much under its feet, simple things should be alright\nand, when in doubt, restart the Lektor server after making big changes.\n\n\n## Gory details\n\nThis plugin uses Lektor's [publisher API][lektorpublisher] in a\nnon-traditional fashion, instead of publishing the resulting artifacts:\n- `gitsrc-forcepull`: updates the source working directory to pull remote\n changes.\n- `gitsrc-push`: auto-commits and pushes to the configured remote.\n\nThe [source code][gspcode] is quite straight forward, when in doubt do read it!\n\n### `gitsrc-forcepull`\n\nThis is roughly equivalent to following pseudo-code:\n\n # Save local changes\n git stash\n # Update remotes\n git fetch --progress\n if (BRANCH != CURRENT_BRANCH) {\n # Ensure we are working on the specified branch\n git checkout -b BRANCH -t REMOTE/BRANCH\n }\n # Merge changes as necessary\n git merge --strategy=recursive --strategy-option=theirs\n # Restore local changes\n git stash pop\n\nThis needs more testing, but appears to be robust enough for simple use-cases\nand should certainly be enough if the user updates before making changes.\n\n\n### `gitsrc-push`\n\nThis is roughly equivalent to following pseudo-code:\n\n # Stage local changes\n git add .\n # Commit staged changes\n git commit -m \"Updated from Lektor\"\n # Push\n git push REMOTE BRANCH\n\nYou may want to setup the `GIT_COMMITTER_NAME` and `GIT_COMMITTER_EMAIL`\nenvironment variables before running Lektor.\n\n\n[lektor]: https://www.getlektor.com\n[lektorplugins]: https://www.getlektor.com/docs/plugins/\n[lektorpublisher]: https://www.getlektor.com/docs/api/publisher/\n[gspcode]: https://github.com/camilioneu/lektor-git-src-publisher\n[gspissues]: https://github.com/camilioneu/lektor-git-src-publisher/issues\n[matrix]: https://matrix.org\n[matrixosscml]: https://matrix.to/#/#oss:camilion.eu\n[camilion]: https://camilion.eu\n[ungleich]: https://ungleich.ch\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/CamilionEU/lektor-git-src-publisher", "keywords": "Lektor plugin", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "lektor-git-src-publisher", "package_url": "https://pypi.org/project/lektor-git-src-publisher/", "platform": "", "project_url": "https://pypi.org/project/lektor-git-src-publisher/", "project_urls": { "Homepage": "https://github.com/CamilionEU/lektor-git-src-publisher" }, "release_url": "https://pypi.org/project/lektor-git-src-publisher/0.1/", "requires_dist": null, "requires_python": "", "summary": "Simple plugin to use Lektor to abstract away git usage.", "version": "0.1" }, "last_serial": 5955178, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "254c992aa17d611cc07e8be0b461d1c5", "sha256": "84606f6474782e9b1df49da99b912e76acda6863c975bc10a93623be69b950eb" }, "downloads": -1, "filename": "lektor_git_src_publisher-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "254c992aa17d611cc07e8be0b461d1c5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5738, "upload_time": "2019-10-10T14:34:48", "url": "https://files.pythonhosted.org/packages/a5/87/b7ac0bfe34bac1853bd44edd06a6e8e461958356881e239f32a145b3cd70/lektor_git_src_publisher-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5dbc7c7c60e6c37d4249db98dd12c896", "sha256": "2d989894bc4fcac217413c6ee4acffc6150911877514bd1526fed72ef688952f" }, "downloads": -1, "filename": "lektor-git-src-publisher-0.1.tar.gz", "has_sig": false, "md5_digest": "5dbc7c7c60e6c37d4249db98dd12c896", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4683, "upload_time": "2019-10-10T14:34:54", "url": "https://files.pythonhosted.org/packages/1a/d9/731ba3301e5b0ae5ad39968c029bcaa368815eef81464938dd38520a7c8a/lektor-git-src-publisher-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "254c992aa17d611cc07e8be0b461d1c5", "sha256": "84606f6474782e9b1df49da99b912e76acda6863c975bc10a93623be69b950eb" }, "downloads": -1, "filename": "lektor_git_src_publisher-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "254c992aa17d611cc07e8be0b461d1c5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5738, "upload_time": "2019-10-10T14:34:48", "url": "https://files.pythonhosted.org/packages/a5/87/b7ac0bfe34bac1853bd44edd06a6e8e461958356881e239f32a145b3cd70/lektor_git_src_publisher-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5dbc7c7c60e6c37d4249db98dd12c896", "sha256": "2d989894bc4fcac217413c6ee4acffc6150911877514bd1526fed72ef688952f" }, "downloads": -1, "filename": "lektor-git-src-publisher-0.1.tar.gz", "has_sig": false, "md5_digest": "5dbc7c7c60e6c37d4249db98dd12c896", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4683, "upload_time": "2019-10-10T14:34:54", "url": "https://files.pythonhosted.org/packages/1a/d9/731ba3301e5b0ae5ad39968c029bcaa368815eef81464938dd38520a7c8a/lektor-git-src-publisher-0.1.tar.gz" } ] }