{"_id":"@b0g3r/vuepress-plugin-locale-prefix","_rev":"3-1c00fec3430da31f8801229b5f277fce","name":"@b0g3r/vuepress-plugin-locale-prefix","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@b0g3r/vuepress-plugin-locale-prefix","version":"0.1.0","license":"MIT","description":"VuePress plugin which replaces /path/%locale%.html paths to /%locale%/path.html","keywords":["i18n","plugin","url","vuepress"],"homepage":"https://github.com/tlbootcamp/vuepres-plugin-locale-prefix","bugs":{"url":"https://github.com/tlbootcamp/vuepres-plugin-locale-prefix/issues"},"repository":{"type":"git","url":"git+https://github.com/tlbootcamp/vuepres-plugin-locale-prefix.git"},"author":{"name":"Dima Boger","email":"kotvberloge@gmail.com"},"main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","watch":"tsc --watch","lint":"eslint --ext .ts src"},"devDependencies":{"vuepress-types":"^0.9.1","@types/node":"^13.13.4","typescript":"^3.8.3","vue-router":"^3.1.6"},"_id":"@b0g3r/vuepress-plugin-locale-prefix@0.1.0","dist":{"shasum":"d5b90ba8b0d66a753d64dd07082de801b2078409","integrity":"sha512-ldHfopM2PVC0TYigXv9ZaJMX7zKZ9iEPgESZ5Tv7BfWnYolCUO3BrHa0WWkgQ7lQyhkZLPI3mYe8vSci51co7Q==","tarball":"https://registry.npmjs.org/@b0g3r/vuepress-plugin-locale-prefix/-/vuepress-plugin-locale-prefix-0.1.0.tgz","fileCount":6,"unpackedSize":2801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqY4VCRA9TVsSAnZWagAAloYP/1jOiUge2y0CStV9GcPL\nKkENngfSKzXegZ6xVc2DrlwXlhAUqczWSBejls+DqEIZnIjJHIqPrm/yffWx\n5rP90oV4yeHCpQvYFzED/aPzl4jbHplV1Dh2IU8i2blJdeL32zP34jk23P5k\n/0wwJdW+JhLuJJa9jq6Dcsm1F0ut/v/6nr7i5h69QJV4UsWMdIczr6F9rXyd\nWNV32yLw5XhjqXNqk+E06cGSli1X8xwZHpOOi7V4EpcKLXWkouEF64EnGt83\nuy1+kTrZ5nPiykjD3ZayVpuF02kjr32At2QfuJxTwRvnIwcfW9cLA4lIa8vL\nzbZtIS4Hy8mNnxzccZpycnw1jtEU2Z0Ynd8qUviTyqhq+HBgvAJB4dXaskkG\n22cjcS2y1A9gUkOz55d8vDkjM9m1AqL3hJ9elfQ6874ksa/LQomwksMuvORr\nuOZl2HYzX3RTRckiPODAR0EQ6+BnQY7eUNiJvNM7QBu9a0qHJGReJk2KHDX3\n8Zw8TeOauZFLAwOhMsWrmsVGi0RK6FNFhDQ7wpOUl8r9yfU3FP44OmezKwhg\nxbjffm78rJ6o/FohiohZobifJMxg5nTl6/WWtApuYBFNJJ90sDnckYFPl7Tr\nyXX4l66Tpu8y+UQfhm8hDuJHkWLDesG3nUKlD+JGG0kh5fauXnd/LEr4nKyg\nCJLa\r\n=m/xh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJpZ0ATRjqW4MJkrQprAFNyV2uuq09DjIvUp1/8ga7JAiEA4FOeWzYpdVyddhrxlcZjIP0e5XPfJtRAmbToX8hlvm8="}]},"maintainers":[{"name":"b0g3r","email":"kotvberloge@gmail.com"}],"_npmUser":{"name":"b0g3r","email":"kotvberloge@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-locale-prefix_0.1.0_1588170260714_0.21783887842406302"},"_hasShrinkwrap":false},"0.1.1":{"name":"@b0g3r/vuepress-plugin-locale-prefix","version":"0.1.1","license":"MIT","description":"VuePress plugin which replaces /path/%locale%.html paths to /%locale%/path.html","keywords":["i18n","plugin","url","vuepress"],"homepage":"https://github.com/tlbootcamp/vuepres-plugin-locale-prefix","bugs":{"url":"https://github.com/tlbootcamp/vuepres-plugin-locale-prefix/issues"},"repository":{"type":"git","url":"git+https://github.com/tlbootcamp/vuepres-plugin-locale-prefix.git"},"author":{"name":"Dima Boger","email":"kotvberloge@gmail.com"},"main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","watch":"tsc --watch","lint":"eslint --ext .ts src"},"devDependencies":{"@types/node":"^13.13.4","babel-eslint":"^10.1.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-vue":"^6.2.2","typescript":"^3.8.3","vue-router":"^3.1.6","vuepress-types":"^0.9.1"},"_id":"@b0g3r/vuepress-plugin-locale-prefix@0.1.1","dist":{"shasum":"22e1c121efce07118ac4cb93c68a5a81aefb620b","integrity":"sha512-UNPC31UzA2jFh1fF9iyBEBIjYzi3lZrPmZjU364hERJolWXJpiLSydEZJsRcYS8aK0sHOZaL4FWpglnkzHm/FQ==","tarball":"https://registry.npmjs.org/@b0g3r/vuepress-plugin-locale-prefix/-/vuepress-plugin-locale-prefix-0.1.1.tgz","fileCount":7,"unpackedSize":5892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqaOwCRA9TVsSAnZWagAAGN4P/3mwr9dCmQsrt5jTs/nw\nqnsjVO3vj9lSlic9IO2KIee2keDhVRToKQKYXRZWGwm19RT+Zvf6rADnIpEk\n6IRa+gdGTDdx6VsQCvFCo/jRCgcJWDFAUL830IUBOptJpBHi3hHgrdKjKlwj\n9LtZYUM8qRGIsHDUlJ3sEyvrT3P1DcQNEjh93mMfN+t8samLcXS4ytX/Rc4y\nuK8bE0M2TzHgocO1PuMKFWBCGcqmuUNRK2P3kVYRj3ePgejxPcCIyDzD3JmU\nksVPiClnQeTRZCnQ0axl14T2407fZA6j4pLGajd/SpF1Fc6fqy6oIoorm2Dn\nUYaAJBKq/oo43Sb9mDHagll2Yf938bTXqcXxQtqsoBD9AjVKkz0Puaj2b/MW\nq25iA2halhf8YhueNnSPjlEyYJhgXkcTrsBcD5f/aMznZVV1kryyIIJyL7o1\nNfT+BFcTsD/HzR4qqnV6HKaKzccAgODe5wgnSc7XLaP69jL9OJplRJJ7CZgI\nDJEwJPED5gncnaW/XRYl6vgAp9CteYOPrGhSblfnst5D/rfCgt7s7Us+sQAG\nicqIHBanNDEoOKvPgp0dTIquQ5zZRC9h0MPDj8bsRjQk7JjcCsMsG6Ecs+zV\nyf+D8Iop5syqprV7rq4mlk1c/KlJM67+7+ZiVBcIdWTIN6n7e8QoDzWEi8bi\n6hnB\r\n=nrmd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDH5rtx283ZHkpZSttiCrzbK/20Mj3jlRenSA8hLZ1XPAiAFjYzTyCJ2mpKQKzrQ73qDLOZuFEcBAYgVgmYF+1iTtg=="}]},"maintainers":[{"name":"b0g3r","email":"kotvberloge@gmail.com"}],"_npmUser":{"name":"b0g3r","email":"kotvberloge@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-locale-prefix_0.1.1_1588175792315_0.6036855788463691"},"_hasShrinkwrap":false},"0.1.2":{"name":"@b0g3r/vuepress-plugin-locale-prefix","version":"0.1.2","license":"MIT","description":"VuePress plugin which replaces /path/%locale%.html paths to /%locale%/path.html","keywords":["i18n","plugin","url","vuepress"],"homepage":"https://github.com/tlbootcamp/vuepres-plugin-locale-prefix","bugs":{"url":"https://github.com/tlbootcamp/vuepres-plugin-locale-prefix/issues"},"repository":{"type":"git","url":"git+https://github.com/tlbootcamp/vuepres-plugin-locale-prefix.git"},"author":{"name":"Dima Boger","email":"kotvberloge@gmail.com"},"main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","watch":"tsc --watch","lint":"eslint --ext .ts src"},"devDependencies":{"@types/node":"^13.13.4","babel-eslint":"^10.1.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-vue":"^6.2.2","typescript":"^3.8.3","vue-router":"^3.1.6","vuepress-types":"^0.9.1"},"_id":"@b0g3r/vuepress-plugin-locale-prefix@0.1.2","dist":{"shasum":"0b14093f11c26a47e30ce884c990bff03247cd54","integrity":"sha512-1qeugwvh+IqQWsI52sBfjHJlMLK8kVJQFN2wZJWrnQNvDOOi/vk6B/FjkV/afuYOzhkNp5Q85T8X/OIUERrL5w==","tarball":"https://registry.npmjs.org/@b0g3r/vuepress-plugin-locale-prefix/-/vuepress-plugin-locale-prefix-0.1.2.tgz","fileCount":7,"unpackedSize":5913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqaZ6CRA9TVsSAnZWagAA2rYP/0fiC2jjH3RN87qqQMZC\nH+WqjHeozSgBUY2n95xAGF4kZSBUQwvPuaUB4ESftgi6NROmiQXo0+gdu3SH\nCKxdL6lfXLuW8NrkupXq/NveRiuqqAnk4eDF2ezSS2Hf0ERx1XFhH0IvnDED\nKXzxRcH4usLfDRFV8WGaxS7yZ7LhSNnxC8J4nT6WDpm7YQrvi9e6sSH1beJw\n+M+2fTzhb4sttEOpZvN/HZs6kAm2+9Sdy6Om0e00ockYyTpNF0c3f74zLef8\nXLcIuccybdVzP4WOi5mIHouCvHQ4cY+wX0gw24Q/kMmLORHHQYqaiPEPAp2a\nDwEOYipkguWOniuzi3OI/Dz5KXMrCgLkWzVPn7EU6+eV8/16fYVFwSSfsjGv\nsP/OSmAfE/51E2rPUCbgbOIn/FeyS+mrfg4Hqg/mH92p+2nR69xvFZsgc7OM\nJGZ9C1VxNEefjVwCjj9HlxWrX6TllDZPx/JbkVTqOoua6kAZ6w4jDpXS416H\nBJzaUSgZrNQC6mPNI8ruCCuCRaTbYsGbK3pV1ah4gRLTylwW3wUq3NtnZgsI\nRpuMJ30QyTXrt7Ido4hx6F1Af2Tne1OUTy+9iR6fMUK9PNlDaVVnx1LndMFj\nbYqBAmsj2P8U7Hb1X0Ea+/3AylTRdxtV5fVoHGJhu28glnPmVoazlVMDpbU+\nKwu7\r\n=OjYT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7ZmKLeVf33KGqFZtOIKpDEkpYNenJ1lKpAOQ3UwNYvAIhAIwycFnXIP9xFSmIJ0VW5B1VwAEXuzmkwT7qWpNClyPI"}]},"maintainers":[{"name":"b0g3r","email":"kotvberloge@gmail.com"}],"_npmUser":{"name":"b0g3r","email":"kotvberloge@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-locale-prefix_0.1.2_1588176506254_0.5475988112522001"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-29T14:24:20.662Z","0.1.0":"2020-04-29T14:24:20.829Z","modified":"2022-04-04T17:23:52.998Z","0.1.1":"2020-04-29T15:56:32.440Z","0.1.2":"2020-04-29T16:08:26.351Z"},"maintainers":[{"name":"b0g3r","email":"kotvberloge@gmail.com"}],"description":"VuePress plugin which replaces /path/%locale%.html paths to /%locale%/path.html","homepage":"https://github.com/tlbootcamp/vuepres-plugin-locale-prefix","keywords":["i18n","plugin","url","vuepress"],"repository":{"type":"git","url":"git+https://github.com/tlbootcamp/vuepres-plugin-locale-prefix.git"},"author":{"name":"Dima Boger","email":"kotvberloge@gmail.com"},"bugs":{"url":"https://github.com/tlbootcamp/vuepres-plugin-locale-prefix/issues"},"license":"MIT","readme":"<h1 align=\"center\">vuepress-plugin-locale-prefix</h1>\n<div align=\"center\">\n\nVuePress plugin which replaces `/path/%locale%.html` paths to `/%locale%/path.html`\n\n![Version](https://img.shields.io/npm/v/@b0g3r/vuepress-plugin-locale-prefix?style=flat-square)\n![License](https://img.shields.io/npm/l/@b0g3r/vuepress-plugin-locale-prefix?style=flat-square)\n\n</div>\n\n## Sorry, plugin for what?\n\nI know, it sounds strange, but sometimes you need this.\n\nFor example you have a big site with project documentation and deep directory nesting:\n```\ndocumentation\n|-- how-to-use\n    `-- dependencies\n        `-- ubuntu-requirements\n            `-- index.md\n...\n```\n\nYour urls looks great, hah? `/documentation/how-to-use/dependencies/ubuntu-requirements` 😍\n\nSo, the next step for your big site is internationalization (`i18n`). The classic way to do it is create first-level directories for each locale:\n```\nen\n|-- documentation\n    `-- how-to-use\n        `-- dependencies\n            `-- ubuntu-requirements\n                `-- index.md  # English doc about ubuntu requirements\nru\n|-- documentation\n    `-- how-to-use\n        `-- dependencies\n            `-- ubuntu-requirements\n                `-- index.md  # Russian doc about ubuntu requirements\n```\n\nWith deep nesting it's very painful to maintain directory tree, because you should duplicate structure for each locale. \n\n... Okay, but what if we try something like **this**?\n\n```\ndocumentation\n|-- how-to-use\n    `-- dependencies\n        `-- ubuntu-requirements\n            |-- en.md  # English doc about ubuntu requirements\n            `-- ru.md  # Russian doc about ubuntu requirements\n...\n```\n\nIn this case we have only one directory tree, but now urls are awful and not SEO friendly: `/documentation/how-to-use/dependencies/ubuntu-requirements/en.html`\n\nSo, my plugin is solution for the problem, it replaces `/documentation/how-to-use/dependencies/ubuntu-requirements/en.html` to `/en/documentation/how-to-use/dependencies/ubuntu-requirements.html` 🎉\n\nPlugin also supports _default locale_, when you want to host one locale as `/`, and others as `/%locale%/`, see \"Options\" \n\nPlugin created especially for [Teamlead Roadmap project](https://github.com/tlbootcamp/tlroadmap)\n\n## Install\n\n```sh\nyarn add -D @b0g3r/vuepress-plugin-locale-prefix\n# OR npm install -D @b0g3r/vuepress-plugin-locale-prefix\n```\n\n## Usage\n**Note:** plugin should be places as high as possible, especially before any plugin that can change page.path or page.regularPath attributes (e.g. `clean-urls`) \n\n```js\nmodule.exports = {\n  plugins: [\n    ['@b0g3r/locale-prefix',{\n      locales: new Map([\n        ['en', '/en/'],\n        ['ru', '/'],\n      ]) \n    }]\n  ]\n}\n```\n\n## Options\n\n### locales (required)\n- Type: `Map<string, string>`\n\nSet mapping of filename → pathPrefix. For example `Map('en' → '/en/', 'ru' → '/')` will host all `en.md` files with root prefix `/en/` and all `ru.md` with root prefix `/`\n","readmeFilename":"README.md"}