Skip to content

Commit 2dd4cce

Browse files
authored
Merge pull request #1 from ibelem/initial-branch
initial commit - infra, doc contents, playground codes
2 parents e77d398 + fb9368b commit 2dd4cce

258 files changed

Lines changed: 28994 additions & 0 deletions

File tree

Some content is hidden

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

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at belem.zhang@intel.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contribution Guidelines
2+
3+
Thanks for taking the time to contribute :+1:
4+
5+
Please note that this project is released with a
6+
[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this
7+
project you agree to abide by its terms.
8+
9+
## How Can I Contribute?
10+
11+
### Creating Issues
12+
13+
Do you know any cool guideline that isn't listed here? It isn't also on the [open issues](https://github.com/webmachinelearning/webnn-docs/issues) or [pull requests](https://github.com/webmachinelearning/webnn-docs/pulls)?
14+
Please create a new issue or submit a pull request, we will be happy to receive it!
15+
16+
### Submitting Pull Requests
17+
18+
Feel free to take any open issue, just make sure that you follow the contribution guidelines.
19+
20+
## Contribution Guidelines
21+
22+
* Please search previous suggestions before making a new one, as yours may be a duplicate.
23+
* Use the following format: `[title](link) - Description. (link to source code)`
24+
* The link should be the name of the package or project.
25+
* Links and categories should be sorted alphabetically.
26+
* Add one link per pull-request.
27+
* Keep descriptions concise, clear and simple.
28+
* Check your spelling and grammar.
29+
* New categories, or improvements to the existing ones are also welcome.
30+
* Make sure your text editor is set to remove trailing whitespace.

LICENSE

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
CC0 1.0 Universal
2+
3+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
4+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
5+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
6+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
7+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
8+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
9+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
10+
HEREUNDER.
11+
12+
Statement of Purpose
13+
14+
The laws of most jurisdictions throughout the world automatically confer
15+
exclusive Copyright and Related Rights (defined below) upon the creator
16+
and subsequent owner(s) (each and all, an "owner") of an original work of
17+
authorship and/or a database (each, a "Work").
18+
19+
Certain owners wish to permanently relinquish those rights to a Work for
20+
the purpose of contributing to a commons of creative, cultural and
21+
scientific works ("Commons") that the public can reliably and without fear
22+
of later claims of infringement build upon, modify, incorporate in other
23+
works, reuse and redistribute as freely as possible in any form whatsoever
24+
and for any purposes, including without limitation commercial purposes.
25+
These owners may contribute to the Commons to promote the ideal of a free
26+
culture and the further production of creative, cultural and scientific
27+
works, or to gain reputation or greater distribution for their Work in
28+
part through the use and efforts of others.
29+
30+
For these and/or other purposes and motivations, and without any
31+
expectation of additional consideration or compensation, the person
32+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
33+
is an owner of Copyright and Related Rights in the Work, voluntarily
34+
elects to apply CC0 to the Work and publicly distribute the Work under its
35+
terms, with knowledge of his or her Copyright and Related Rights in the
36+
Work and the meaning and intended legal effect of CC0 on those rights.
37+
38+
1. Copyright and Related Rights. A Work made available under CC0 may be
39+
protected by copyright and related or neighboring rights ("Copyright and
40+
Related Rights"). Copyright and Related Rights include, but are not
41+
limited to, the following:
42+
43+
i. the right to reproduce, adapt, distribute, perform, display,
44+
communicate, and translate a Work;
45+
ii. moral rights retained by the original author(s) and/or performer(s);
46+
iii. publicity and privacy rights pertaining to a person's image or
47+
likeness depicted in a Work;
48+
iv. rights protecting against unfair competition in regards to a Work,
49+
subject to the limitations in paragraph 4(a), below;
50+
v. rights protecting the extraction, dissemination, use and reuse of data
51+
in a Work;
52+
vi. database rights (such as those arising under Directive 96/9/EC of the
53+
European Parliament and of the Council of 11 March 1996 on the legal
54+
protection of databases, and under any national implementation
55+
thereof, including any amended or successor version of such
56+
directive); and
57+
vii. other similar, equivalent or corresponding rights throughout the
58+
world based on applicable law or treaty, and any national
59+
implementations thereof.
60+
61+
2. Waiver. To the greatest extent permitted by, but not in contravention
62+
of, applicable law, Affirmer hereby overtly, fully, permanently,
63+
irrevocably and unconditionally waives, abandons, and surrenders all of
64+
Affirmer's Copyright and Related Rights and associated claims and causes
65+
of action, whether now known or unknown (including existing as well as
66+
future claims and causes of action), in the Work (i) in all territories
67+
worldwide, (ii) for the maximum duration provided by applicable law or
68+
treaty (including future time extensions), (iii) in any current or future
69+
medium and for any number of copies, and (iv) for any purpose whatsoever,
70+
including without limitation commercial, advertising or promotional
71+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
72+
member of the public at large and to the detriment of Affirmer's heirs and
73+
successors, fully intending that such Waiver shall not be subject to
74+
revocation, rescission, cancellation, termination, or any other legal or
75+
equitable action to disrupt the quiet enjoyment of the Work by the public
76+
as contemplated by Affirmer's express Statement of Purpose.
77+
78+
3. Public License Fallback. Should any part of the Waiver for any reason
79+
be judged legally invalid or ineffective under applicable law, then the
80+
Waiver shall be preserved to the maximum extent permitted taking into
81+
account Affirmer's express Statement of Purpose. In addition, to the
82+
extent the Waiver is so judged Affirmer hereby grants to each affected
83+
person a royalty-free, non transferable, non sublicensable, non exclusive,
84+
irrevocable and unconditional license to exercise Affirmer's Copyright and
85+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
86+
maximum duration provided by applicable law or treaty (including future
87+
time extensions), (iii) in any current or future medium and for any number
88+
of copies, and (iv) for any purpose whatsoever, including without
89+
limitation commercial, advertising or promotional purposes (the
90+
"License"). The License shall be deemed effective as of the date CC0 was
91+
applied by Affirmer to the Work. Should any part of the License for any
92+
reason be judged legally invalid or ineffective under applicable law, such
93+
partial invalidity or ineffectiveness shall not invalidate the remainder
94+
of the License, and in such case Affirmer hereby affirms that he or she
95+
will not (i) exercise any of his or her remaining Copyright and Related
96+
Rights in the Work or (ii) assert any associated claims and causes of
97+
action with respect to the Work, in either case contrary to Affirmer's
98+
express Statement of Purpose.
99+
100+
4. Limitations and Disclaimers.
101+
102+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
103+
surrendered, licensed or otherwise affected by this document.
104+
b. Affirmer offers the Work as-is and makes no representations or
105+
warranties of any kind concerning the Work, express, implied,
106+
statutory or otherwise, including without limitation warranties of
107+
title, merchantability, fitness for a particular purpose, non
108+
infringement, or the absence of latent or other defects, accuracy, or
109+
the present or absence of errors, whether or not discoverable, all to
110+
the greatest extent permissible under applicable law.
111+
c. Affirmer disclaims responsibility for clearing rights of other persons
112+
that may apply to the Work or any use thereof, including without
113+
limitation any person's Copyright and Related Rights in the Work.
114+
Further, Affirmer disclaims responsibility for obtaining any necessary
115+
consents, permissions or other rights required for any use of the
116+
Work.
117+
d. Affirmer understands and acknowledges that Creative Commons is not a
118+
party to this document and has no duty or obligation with respect to
119+
this CC0 or use of the Work.
120+
121+
For more information, please see
122+
<http://creativecommons.org/publicdomain/zero/1.0/>

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1+
# Welcome to WebNN Docs
12

3+
[WebNN Docs][https://github.com/webmachinelearning/webnn-docs] is an open-source, collaborative project that documents Web Neural Network (WebNN) API.
4+
5+
## Build the site
6+
7+
To set up the site locally, you need to have [Node.js](https://nodejs.org/) installed. You can check if these are installed by running the following commands:
8+
9+
```bash
10+
node -v
11+
```
12+
13+
After you have installed Node.js, you can install the dependencies:
14+
15+
```bash
16+
npm install
17+
npm run dev
18+
```
19+
20+
Once started, a live preview is available at `http://localhost:3000`.
21+
22+
## Contribute to WebNN Docs
23+
24+
You can contribute to WebNN Docs and be a part of our community through content contributions, engineering, or translation work.
25+
The WebNN Docs project welcomes contributions from everyone who shares our goals and wants to contribute constructively and respectfully within our community.
26+
27+
To find out how to get started, see the [CONTRIBUTING.md](CONTRIBUTING.md) document in this repository.
28+
By participating in and contributing to our projects and discussions, you acknowledge that you have read and agree to our [Code of Conduct](CODE_OF_CONDUCT.md).

app/[lang]/[[...mdxPath]]/page.jsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { generateStaticParamsFor, importPage } from 'nextra/pages'
2+
import { useMDXComponents } from '../../../mdx-components'
3+
4+
export const generateStaticParams = generateStaticParamsFor('mdxPath')
5+
6+
export async function generateMetadata(props) {
7+
const params = await props.params;
8+
const { metadata } = await importPage(params.mdxPath, params.lang);
9+
return metadata;
10+
}
11+
12+
const Wrapper = useMDXComponents().wrapper;
13+
14+
export default async function Page(props) {
15+
const params = await props.params;
16+
// console.log('++++++++++++++++++++++')
17+
// console.log(`++++ ${params.lang} ++++`);
18+
19+
const result = await importPage(params.mdxPath, params.lang);
20+
const { default: MDXContent, toc, metadata } = result;
21+
return (
22+
<Wrapper toc={toc} metadata={metadata}>
23+
<MDXContent {...props} params={params} />
24+
</Wrapper>
25+
)
26+
}

0 commit comments

Comments
 (0)