Skip to content

Commit 73040c2

Browse files
committed
feat: repository converted to MkDocs monorepo
1 parent 0ec1587 commit 73040c2

File tree

288 files changed

+1653
-1684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

288 files changed

+1653
-1684
lines changed

CONTRIBUTING.md

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
How to Contribute
2-
=================
1+
# How to Contribute
32

43
When contributing to this repository, please first discuss the change you wish
54
to make via submitting an issue with the owners of this repository before making
@@ -9,6 +8,7 @@ discussion.
98
## Branching Model
109

1110
This repository holds two main branches with an infinite lifetime:
11+
1212
* `master` is the default branch which always reflects the latest release.
1313
* `develop` is the main branch reflecting the latest delivered changes for the
1414
next release. When the `develop` branch reaches a stable point and is ready to
@@ -22,38 +22,58 @@ branches have a limited lifespan, since they will be removed eventually.
2222
Contributions to this repository are welcome. For ease of managing, please
2323
follow the steps below:
2424

25-
1. Fork this repository to your account.
25+
1. Fork this repository to your account.
26+
27+
2. Clone your copy of this repository, locally.
28+
29+
```
30+
git clone https://github.com/YOU/API-Security.git
31+
```
32+
33+
3. Create a new branch based on `develop` (e.g., `fix/foreword-section`).
34+
35+
```
36+
git checkout develop && git checkout -b fix/foreword-section
37+
```
38+
39+
4. Apply your changes.
40+
41+
Please, always follow our style conventions.
42+
43+
44+
Although there's an [`.editorconfig` file][1] on repository's root, your
45+
editor may not support it. To learn more about [EditorConfig][2] and text
46+
editors/IDEs support, check the website: https://editorconfig.org/.
47+
You can preview your changes, [rendering the web site locally][4].
48+
49+
5. Commit your changes.
50+
51+
1. Check modified files and add only required ones (e.g., build artifacts
52+
SHOULD NOT be tracked).
53+
2. The first line of the commit message should provide a brief description
54+
of your changes. You can go into more details on the optional commit
55+
message body.
2656
27-
2. Clone your copy of this repository, locally.
28-
```
29-
git clone https://github.com/YOU/API-Security.git
30-
```
31-
3. Create a new branch based on `develop` (e.g., `fix/foreword-section`).
32-
```
33-
git checkout develop && git checkout -b fix/foreword-section
34-
```
35-
4. Apply your changes.
57+
6. Push changes to your public repository.
3658
37-
Please, always follow our style conventions.
59+
```
60+
git push origin fix/foreword-section
61+
```
3862
39-
Although there's an [`.editorconfig` file][1] on repository's root, your
40-
editor may not support it. To learn more about [EditorConfig][2] and text
41-
editors/IDEs support, check the website: https://editorconfig.org/.
63+
7. Open a Pull Request from your `fix/foreword-section` to the upstream
64+
repository `develop` branch.
4265
43-
5. Commit your changes.
66+
### Rendering the Web Site Locally
4467
45-
1. Check modified files and add only required ones (e.g., build artifacts
46-
SHOULD NOT be tracked).
47-
2. The first line of the commit message should provide a brief description of
48-
your changes. You can go into more details on the optional commit message
49-
body.
68+
The web site is built using [Material for MkDocs][3] and several plugin.
69+
Although you can manually install everything, we've bundled everything into a
70+
Docker image that you can use to render the web site locally:
5071
51-
6. Push changes to your public repository.
52-
```
53-
git push origin fix/foreword-section
54-
```
55-
7. Open a Pull Request from your `fix/foreword-section` to the upstream
56-
repository `develop` branch.
72+
```
73+
docker compose up
74+
```
5775
58-
[1]: .editorconfig
76+
[1]: https://github.com/OWASP/API-Security/blob/master/.editorconfig
5977
[2]: https://editorconfig.org/
78+
[3]: https://squidfunk.github.io/mkdocs-material/
79+
[4]: #rendering-the-web-site-locally

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM squidfunk/mkdocs-material:9.0.9
2+
3+
ENV MKDOCS_MONOREPO_REPO=https://github.com/PauloASilva/mkdocs-monorepo-plugin
4+
ENV MKDOCS_MONOREPO_BRANCH="feat/i18n"
5+
6+
RUN python -m pip install git+$MKDOCS_MONOREPO_REPO@$MKDOCS_MONOREPO_BRANCH
7+
RUN python -m pip install pymdown-extensions

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
OWASP API Security Top 10
2-
=========================
1+
# OWASP API Security Top 10
32

43
This project is designed to address the ever-increasing number of organizations
54
that are deploying potentially sensitive APIs as part of their software
@@ -41,7 +40,7 @@ This project aims to:
4140
**The OWASP API Security Project documents are free to use!**
4241

4342
The OWASP API Security Project is licensed under the [Creative Commons
44-
Attribution-ShareAlike 3.0 license][1], so you can copy, distribute, and
43+
Attribution-ShareAlike 4.0 license][1], so you can copy, distribute, and
4544
transmit the work. You can also adapt it, and use it commercially, as long as
4645
you attribute the work. If you alter, transform, or build upon this work, you
4746
may distribute the resulting work only under the same or similar license to this

docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: "3.9"
2+
3+
services:
4+
5+
preview:
6+
build: .
7+
image: owasp/api-top10:latest
8+
container_name: "owasp_api-top10"
9+
ports:
10+
- "8000:8000"
11+
volumes:
12+
- .:/docs:ro

docs/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CONTRIBUTING.md

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md

docs/assets/images/favicon.png

3.6 KB
Loading

docs/assets/images/icon.png

89.3 KB
Loading

docs/assets/stylesheets/extra.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.md-tabs {
2+
background-color: var(--md-code-bg-color);
3+
color: var(--md-footer-bg-color);
4+
}
5+
6+
.md-header__button.md-logo img {
7+
height: 1.6rem;
8+
}
9+
10+
.md-grid {
11+
max-width: 75%;
12+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{% set class = "md-header" %}
2+
{% if "navigation.tabs.sticky" in features %}
3+
{% set class = class ~ " md-header--lifted" %}
4+
{% endif %}
5+
<header class="{{ class }}" data-md-component="header">
6+
<nav class="md-header__inner md-grid" aria-label="{{ lang.t('header.title') }}">
7+
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-header__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
8+
{% include "partials/logo.html" %}
9+
</a>
10+
<label class="md-header__button md-icon" for="__drawer">
11+
{% include ".icons/material/menu" ~ ".svg" %}
12+
</label>
13+
<div class="md-header__title" data-md-component="header-title">
14+
<div class="md-header__ellipsis">
15+
<div class="md-header__topic">
16+
<span class="md-ellipsis">
17+
{{ config.site_name }}
18+
</span>
19+
</div>
20+
<div class="md-header__topic" data-md-component="header-topic">
21+
<span class="md-ellipsis">
22+
{% if page and page.meta and page.meta.title %}
23+
{{ page.meta.title }}
24+
{% else %}
25+
{{ page.title }}
26+
{% endif %}
27+
</span>
28+
</div>
29+
</div>
30+
</div>
31+
{% if not config.theme.palette is mapping %}
32+
<form class="md-header__option" data-md-component="palette">
33+
{% for option in config.theme.palette %}
34+
{% set primary = option.primary | replace(" ", "-") | lower %}
35+
{% set accent = option.accent | replace(" ", "-") | lower %}
36+
<input class="md-option" data-md-color-media="{{ option.media }}" data-md-color-scheme="{{ option.scheme }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}" {% if option.toggle %} aria-label="{{ option.toggle.name }}" {% else %} aria-hidden="true" {% endif %} type="radio" name="__palette" id="__palette_{{ loop.index }}">
37+
{% if option.toggle %}
38+
<label class="md-header__button md-icon" title="{{ option.toggle.name }}" for="__palette_{{ loop.index0 or loop.length }}" hidden>
39+
{% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
40+
</label>
41+
{% endif %}
42+
{% endfor %}
43+
</form>
44+
{% endif %}
45+
{% if config.extra.alternate %}
46+
<div style="margin-left: 10px; margin-right: 10px;">
47+
{% include "partials/i18n_languages.html" %}
48+
</div>
49+
{% endif %}
50+
{% if "material/search" in config.plugins %}
51+
<label class="md-header__button md-icon" for="__search">
52+
{% include ".icons/material/magnify.svg" %}
53+
</label>
54+
{% include "partials/search.html" %}
55+
{% endif %}
56+
{% if config.repo_url %}
57+
<div class="md-header__source">
58+
{% include "partials/source.html" %}
59+
</div>
60+
{% endif %}
61+
</nav>
62+
{% if "navigation.tabs.sticky" in features %}
63+
{% if "navigation.tabs" in features %}
64+
{% include "partials/tabs.html" %}
65+
{% endif %}
66+
{% endif %}
67+
</header>

0 commit comments

Comments
 (0)