{"id":19298230,"url":"https://github.com/casbin/casbin-website","last_synced_at":"2025-04-03T02:09:38.374Z","repository":{"id":37533933,"uuid":"144433662","full_name":"casbin/casbin-website","owner":"casbin","description":"Deprecated! Please use v2 docs site: https://github.com/casbin/casbin-website-v2 | The v1 docs website for Casbin","archived":false,"fork":false,"pushed_at":"2023-07-11T09:50:55.000Z","size":2398,"stargazers_count":39,"open_issues_count":0,"forks_count":132,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T22:37:44.131Z","etag":null,"topics":["casbin","docs","documentation","docusaurus","jcasbin","node-casbin"],"latest_commit_sha":null,"homepage":"https://v1.casbin.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casbin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/Contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"casbin"}},"created_at":"2018-08-12T03:03:57.000Z","updated_at":"2024-02-26T06:20:05.000Z","dependencies_parsed_at":"2022-09-10T14:41:30.082Z","dependency_job_id":null,"html_url":"https://github.com/casbin/casbin-website","commit_stats":{"total_commits":695,"total_committers":116,"mean_commits":5.991379310344827,"dds":"0.40143884892086334","last_synced_commit":"aaa7d7ec307b72c19c0810c3a3205723e28d3d3f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fcasbin-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fcasbin-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fcasbin-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fcasbin-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casbin","download_url":"https://codeload.github.com/casbin/casbin-website/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922247,"owners_count":20855345,"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":["casbin","docs","documentation","docusaurus","jcasbin","node-casbin"],"created_at":"2024-11-09T23:07:19.630Z","updated_at":"2025-04-03T02:09:38.348Z","avatar_url":"https://github.com/casbin.png","language":"JavaScript","readme":"# [v1.casbin.org](https://v1.casbin.org/) [![Build Status](https://img.shields.io/github/workflow/status/casbin/casbin-website/Node.js%20CI)](https://github.com/casbin/casbin-website/actions) \nThe site configuration and documentation powering Casbin's website: https://v1.casbin.org\n\n## Getting started\n\n### Prerequisites\n\n1.  Git\n1.  Node: install version 6.2.2 or greater. Node v8 would be ideal.\n1.  Yarn: See [Yarn Installation](https://yarnpkg.com/lang/en/docs/install/)\n1.  Docusaurus: Run `yarn global add docusaurus-init` or `npm install --global docusaurus-init`\n\n### Installation\n\n1.  `git clone https://github.com/casbin/casbin-website` to download source code.\n1.  `cd casbin-website` to go into the project root.\n1.  `cd website` to go into the website portion of the project.\n1.  `yarn` to install the website's npm dependencies (or `npm install`, if not using Yarn).\n\n### Running locally\n\n1.  `yarn start` to start the development server (powered by Docusaurus) (or `npm start`, if not using Yarn).\n1.  open `http://localhost:3000/` to open the site in your favorite browser.\n\n### Publish manually (optional)\n\nWhenever a new commit lands in `master`, the change will be automatically\npublished to: https://v1.casbin.org. However, if you want to deploy the site manually,\nmake sure you have `write` access to: https://github.com/casbin/casbin.github.io,\nand use the following instruction:\n\n1. `yarn run publish-gh-pages` to publish the site to GitHub pages: https://github.com/casbin/casbin.github.io (aka https://v1.casbin.org).\n\n# Overview\n\nIf you're here because you would like to contribute an edit or addition to the\ndocs, you'll probably want to take a look at the `docs/` directory.\n\nTo edit the internals of how the site is built, you may want to get familiarized\nwith how the site is built. The Casbin website is a static site generated\nusing [Docusaurus](https://docusaurus.io). The website configuration can be\nfound in the `website/` directory. Visit the Docusaurus website to learn more\nabout all the available configuration options.\n\n## Directory structure\n\nThe following is a high-level overview of relevant files and folders.\n\n```\ncasbin-website/\n├── docs/\n│   ├── assets/\n│   ├── accessibility.md\n│   └── ...\n└── website/\n    ├── blog/\n    │   ├── assets/\n    │   ├── 2015-03-26-casbin-bringing-modern-web-techniques-to-mobile.md\n    │   └── ...\n    ├── core/\n    ├── pages/\n    │   └── en/\n    │       ├── ...\n    │       ├── index.js\n    │       └── ...\n    ├── static/\n    │   ├── css/\n    │   ├── img/\n    │   └── js/\n    ├── versioned_docs/\n    │   ├── version-0.5/\n    │   └── ...\n    ├── versioned_sidebars/\n    │   ├── version-0.5-sidebars.json\n    │   └── ...\n    ├── showcase.json\n    ├── sidebars.json\n    ├── siteConfig.js\n    └── versions.json\n```\n\n## Documentation sources\n\nAs mentioned above, the `docs/` folder contains the source files for all of the\ndocs in the Casbin website. In most cases, you will want to edit the files\nwithin this directory. If you're adding a new doc or you need to alter the order\nthe docs appear in the sidebar, take a look at the `sidebars.json` file in the\n`website/` directory. The sidebars file contains a list of document ids that\nshould match those defined in the header metadata (aka frontmatter) of the docs\nmarkdown files.\n\n### Versioned docs\n\nThe Casbin website is versioned as to allow users to go back and see the\nAPI reference docs for any given release. A new version of the website is\ngenerally made whenever there is a new Casbin release. When this happens,\nany changes made to the `docs/` and `website/sidebars.json` files will be copied\nover to the corresponding location within `website/versioned_docs/` and\n`website/versioned_sidebars/`.\n\n\u003e Do not edit the auto-generated files within `versioned_docs/` or\n\u003e `versioned_sidebars/` unless you are sure it is necessary. Edits made to older\n\u003e versions will not be propagated to newer versions of the docs.\n\nDocusaurus keeps track of the list of versions for the site in the\n`website/versions.json` file. The ordering of the versions in this file should\nbe in reverse chronological order.\n\n#### Cutting a new version\n\n1.  `cd casbin-website` to go into the project root\n1.  `cd website` to go into the website portion of the project\n1.  Run `yarn version \u003cversion\u003e` where `\u003cversion\u003e` is the new version being\n    released.\n\n## Website configuration\n\nThe main config file for the website can be found at `website/siteConfig.js`.\nThis file tells Docusaurus [how to build the website](http://docusaurus.io/docs/en/site-config.html).\nEdits to this file are rarely necessary.\n\nThe `pages/` subdirectory contains the Casbin components that make up the\nnon-documentation pages of the site, such as the homepage.\n\nThe `showcase.json` file contains the list of users that are highlighted in the\nCasbin showcase.\n\n## Contributing\n\n### Create a branch\n\n1.  `git checkout master` from any folder in your local `casbin-website` repository.\n1.  `git pull origin master` to ensure you have the latest main code.\n1.  `git checkout -b the-name-of-my-branch` (replacing `the-name-of-my-branch`\n    with a suitable name) to create a branch.\n\n### Make the change\n\n1.  Follow the [Running locally](#running-locally) instructions.\n1.  Save the files and check in the browser. Some changes may require a server restart.\n1.  Changes to `/docs` will only be visible in the latest version of the documentation (master).\n\nopen `http://localhost:3000/casbin/versions.html` to see other versions.\n\n### Test the change\n\n1.  If possible, test any visual changes in all latest versions of common\n    browsers, on both desktop and mobile.\n\n### Push it\n\n1.  Run `yarn prettier` to ensure your changes are consistent with other files in\n    the repo\n1.  `git add -A \u0026\u0026 git commit -m \"My message\"` (replacing `My message` with a\n    commit message, such as `Fixed header logo on Android`) to stage and commit\n    your changes\n1.  `git push my-fork-name the-name-of-my-branch`\n1.  Go to the\n    [casbin-website repo](https://v1.casbin.org)\n    and you should see recently pushed branches.\n1.  Follow GitHub's instructions.\n1.  If possible, include screenshots of visual changes.\n\n---\n\n## Translation\n\n[Crowdin](https://crowdin.com/project/casbin) is used for Casbin website's translation. You can contribute to the translation of your proficient languages on that.\n\n### Build the translation project locally\nPlease contact the Casbin team for manager access on Crowdin.\n\n### Manually trigger Crowdin [DEPRECATED]\n\n- Install Crowdin CLI:\n\nhttps://support.crowdin.com/cli-tool/\n\n- Setup environment variable:\n\n```\nCROWDIN_DOCUSAURUS_API_KEY = XXX\n```\n\n- Upload:\n\n```\ncrowdin --config ../crowdin.yaml upload sources --auto-update -b master\n```\n\n- Download:\n\n```\ncrowdin --config ../crowdin.yaml download -b master\n```\n\n\u003e Noting that the translation of the official website will update after a Pull Request is merged\n\n## License\n\nCasbin is [Apache licensed](./LICENSE).\n\nCasbin documentation is [Creative Commons licensed](./LICENSE-docs).\n","funding_links":["https://github.com/sponsors/casbin"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fcasbin-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasbin%2Fcasbin-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fcasbin-website/lists"}