Code Monkey home page Code Monkey logo

casbin-website-v2's Introduction

The configuration and documentation of Casbin website: https://casbin.org/.

Casbin website is built using Docusaurus, you can get the PDF at casbin.org/pdf or GitHub Action.

Get Started

Requirements

  1. Git
  2. Node.js:v16.14 or above
  3. Yarn: please use Yarn 1

Running Locally

  1. git clone https://github.com/casbin/casbin-website-v2.git
  2. cd casbin-website-v2
  3. yarn: install dependencies.
  4. yarn start: starting the development server.

Contributing

You can contribute to the documentation site in different ways: Documentation Writing, Translation, Website Development.

Documentation Writing

For the configuration of the sidebar, you can refer to Sidebar.

For the features that you may use when writing documents, please refer to Markdown Features.

A standard document should look like this:

---
title: Title
description: description
keywords: [keyword1, keyword2]
authors: [GitHub username]
---

## Headers

Only h2 and h3 will be in the TOC by default, so h1 is not recommended to use.

### h3

content

#### h4

content

We use markdownlint-cli to lint the markdown and mdx files, you can use the following command to fix basic errors and get a list of document issues:

yarn lint:md

If you write docs using VSCode, Sublime, or Vim/Neovim, you can install the extension to get better lint experience.

Caution

Admonitions

You can add Admonitions in the documentation, but please leave two blank lines like this:

:::info Title

Title is optional

:::
JSX

You can use JSX in documents, such as the Tabs component provided by Docusaurus, but to prevent Crowdin from breaking the code (mdx-solutions), please wrap the JSX code:

```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```

```mdx-code-block
<Tabs>
<TabItem value="go" label="Go">
```

content

```mdx-code-block
</TabItem>
<TabItem value="java" label="Java">
```

content

```mdx-code-block
</TabItem>
</Tabs>
```

Translation

Crowdin and Docusaurus i18n is used for Casbin website's translation.

Note: Please do not translate strings like :::note, :::tip, wrong translation may cause typographical error(casdoor-website#305).

You may see some sentences containing {}, like:

At our {repoLink}, browse and submit {issueLink} or {prLink} for bugs you find or any new features you may want implemented.

Please do not translate {repoLink} or {issueLink} or any similar words, they are interpolation placeholders.

Please don't translate sentences like authors: [casdoor].

Website Development

See Creating Pages to learn how to create a page.

See Styling and Layout to learn how to modify styles.

See Swizzling to learn how to modify Docusaurus built-in components.

LICENSE

Apache-2.0 license.

casbin-website-v2's People

Contributors

00lt00 avatar ashish493 avatar bartventer avatar betacat0 avatar bustdot avatar chetan-v avatar divy9881 avatar ebreak avatar emperoryp7 avatar erikqqy avatar gopherj avatar hackerchai avatar hsluoyz avatar jalinwang avatar juicycleff avatar kilosonc avatar kingiw avatar leeqvip avatar nekotoxin avatar nodece avatar nomeguy avatar oyyko avatar pokisemaine avatar rushitote avatar sagilio avatar selflocking avatar shivansh-yadav13 avatar tinywan avatar uran0sh avatar yanggggjie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

casbin-website-v2's Issues

Description conflict of policy filter

There may be two different structure descriptions of the policy filter:

enforcer.InitWithAdapter("examples/rbac_with_domains_model.conf", adapter)
filter := &fileadapter.Filter{
P: []string{"", "domain1"},
G: []string{"", "", "domain1"},
}
enforcer.LoadFilteredPolicy(filter)
// The loaded policy now only contains the entries pertaining to "domain1".

* `LoadFilteredPolicy` requires a `filter` as parameter. The filter should be something like this.
```json
{
"p":[ [ "alice" ], [ "bob" ] ],
"g":[ [ "", "book_group" ], [ "", "pen_group" ] ],
"g2":[ [ "alice" ] ]
}
```

[crowdin] remove useless words in Crowdin v2 project

Compare our Crowdin v1 project: https://crowdin.com/project/casbin

image

with v2 project: https://crowdin.com/project/casbin-website

image

Actually v2 docs and v1 markdown docs are exactly the same, but v2 crowdin has 10,000+ words more than v1's. This already casues our v2 site suspended due to exceeding the word limit set by Crowdin.

image

Actually I found v2 has another i18n folder to translate, is it useless? If yes, we should delete it to reduce word count.

v1 folders: https://crowdin.com/project/casbin/zh-CN

image

v2 folders: https://crowdin.com/project/casbin-website/zh-CN

image

[Feature]Please Add more detailed Examples about ABAC

Want to prioritize this issue? Try:

issuehunt-to-marktext

Very obviously, your documents and examples about ABAC nearly NOTHING! No mention that the casbin ABAC is not using any standard XACML implmentations.

I think it's not a bad thing to use a customized PML, that's fine. But you need to let people more easy to know how to use it, rather than users try it by testing to found out how to use it.

It's obviously not to complex for your engineers to write more examples about your ABAC. But it's quite a borden for people to known how to write its rules and confs.
Please add this, it's really not a tough work at All.


Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.