-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Merge documentation into monorepo #1387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
teymour-aldridge
wants to merge
120
commits into
yewstack:master
from
teymour-aldridge:merge-documentation
Closed
Changes from all commits
Commits
Show all changes
120 commits
Select commit
Hold shift + click to select a range
03af81f
Initialize repository
gitbook-bot 1b375da
GitBook: [master] 17 pages and one asset modified
jstarry 854f5f5
GitBook: [master] one page modified
jstarry fb8901f
GitBook: [master] one page modified
jstarry 9112234
GitBook: [master] 2 pages modified
jstarry c3efe1a
GitBook: [master] 7 pages modified
jstarry 3bb9565
GitBook: [master] one page modified
jstarry e78089f
GitBook: [master] 2 pages modified
jstarry 929d4e9
GitBook: [master] one page modified
jstarry 1eaf0c8
GitBook: [master] 2 pages modified
jstarry 686f4df
GitBook: [master] one page modified
jstarry a802a79
GitBook: [master] one page modified
jstarry c79d895
GitBook: [master] one page modified
jstarry 067d281
Create LICENSE
jstarry ce9a4bf
Changed 'Model' to 'App' (#1)
danbugs 87d231a
Gitbook: [master] one page modified (#2)
jakequade 590b547
GitBook: [master] 2 pages modified
Ticsmtc f751f81
GitBook: [master] 2 pages modified
jstarry bd84cc4
GitBook: [master] one page modified
jstarry 5dad9d4
GitBook: [master] one page modified
jstarry 5ef2502
GitBook: [master] one page modified
jstarry ee9364b
GitBook: [master] one page modified
jstarry b9c3e3f
GitBook: [master] one page modified
jstarry 7d91013
GitBook: [master] one page modified
jstarry d3d9b1e
GitBook: [master] one page modified
jstarry 0b45ba4
GitBook: [master] one page modified
jstarry 8e8ba82
GitBook: [master] 39 pages modified
jstarry a946404
GitBook: [master] one page modified
jstarry f45bf32
GitBook: [master] 4 pages modified
jstarry ffc9fce
GitBook: [master] 31 pages modified
jstarry 6e28235
building instructions
jstarry ac701a2
GitBook: [master] one page and one asset modified
jstarry a5fdbf0
GitBook: [master] one page modified
jstarry 0c2c863
Add a link to the Yew Router docs. (#11)
thedodd d2b33f0
Update docs to yew v0.11
jstarry 5b9b050
Fix router page
jstarry c5f75c3
GitBook: [master] 2 pages modified
jstarry 6a62cca
GitBook: [master] one page modified
jstarry d156979
GitBook: [master] 2 pages modified
jstarry 83c50c8
GitBook: [master] 3 pages modified
jstarry 075aa49
GitBook: [master] one page modified
jstarry a585bff
GitBook: [master] 2 pages modified
jstarry 74b8c1f
GitBook: [master] 6 pages modified
jstarry 2162252
GitBook: [master] one page modified
jstarry 5eea83c
Fix typo in port number (#17)
RAOF bc040e4
Change 'Model' to 'App' in sample app description. (#18)
samuelvanderwaal 5182c33
Typo: s/you/your/ (#19)
oylenshpeegul 4a43e22
GitBook: [master] one page modified
jstarry ffba8b6
Rust Most Loved Language Four Years in a Row (#20)
samuelvanderwaal 786b4e7
GitBook: [master] one page modified
jstarry 2822472
GitBook: [master] 2 pages modified
jstarry c07adb1
GitBook: [master] 2 pages modified
jstarry 1f465cf
GitBook: [master] 18 pages modified
jstarry a70817c
Fix broken crates.io link (#28)
elertan e48421a
Remove redundant gitbook asset
jstarry d1f4f04
docs: fixed typos (#29)
twchn 37c24db
docs: delete unused documents (#31)
twchn 46dc48e
GitBook: [master] 3 pages modified
jstarry ec48b42
GitBook: [master] 12 pages modified
jstarry 01f0098
Fix formatting
jstarry 310294a
GitBook: [master] one page modified
jstarry a9b2243
GitBook: [master] one page modified
jstarry ab46d1b
GitBook: [master] one page modified
jstarry edba34f
Fix sample app toml
jstarry 1d1eb7f
Update links for `todomvc` and `multi_thread` (#37)
Type1J dcccea4
docs: fixed typos (#38)
jstarry d492982
GitBook: [master] 2 pages modified
jstarry 01cc404
GitBook: [master] one page modified
jstarry 6b34dae
style: fixed some formats (#44)
twchn 31e52d4
Update the Properties Documentation for 0.13 (#45)
mrh0057 83eeb18
style: fixed some formats (#48)
twchn f84749b
GitBook: [master] 4 pages modified
jstarry f8e183c
GitBook: [master] one page modified
jstarry 2069cd1
GitBook: [master] 2 pages modified
t7yang d2e8042
Added additional references for docs on agents. (#52)
teymour-aldridge 4eb7413
Revert "GitBook: [master] 2 pages modified"
jstarry 760072e
Add agent lifecycle diagram. (#54)
teymour-aldridge fd694e3
Add doctests. (#55)
teymour-aldridge f9ed6f7
GitBook: [master] one page modified
lili668668 69a2c3d
Update getting started example to 0.14.3 (#58)
jgpaiva 7f796db
Update examples.md (#59)
jakeols aeb5eaa
link bincode project in agents docs (#62)
Felk 6d41663
Update examples to 0.15.0 (#61)
marcelbuesing 840e14b
Added note on clone trait bound. (#69)
teymour-aldridge 89b07fa
Add reference to wasm_bindgen_test (#73)
teymour-aldridge 3893e1d
Size optimization info (#64)
fbucek 7aee295
GitBook: [master] 7 pages modified
jstarry 6d5e9fc
Fix tests (#78)
jstarry c83e837
Made explanations clearer. (#68)
teymour-aldridge d11c4fc
Rename 'parcel' to 'further reading' (#77)
teymour-aldridge d429698
GitBook: [master] 2 pages modified
jstarry befa17e
Added code examples for the router docs. (#67)
teymour-aldridge 1a7d5b8
GitBook: [master] 3 pages modified
jstarry 00712bf
GitBook: [master] one page modified
jstarry a839251
Update the sample doc app to use wasm-pack (#75)
D4nte dbb40d9
Fixed bad link to build script for wasm-bindgen/cargo-web (#81)
ETCaton 8fcd3ae
Update miniserve cargo install command (#88)
drpoggi dcc66a4
Added missing "d" in "bindgen" (#91)
AntBlo 16eb56c
create as lib right away (#93)
bc8a896
updated (#92)
2a111b9
GitBook: [master] 29 pages modified
lili668668 a874379
GitBook: [master] 29 pages modified
lili668668 fce3040
GitBook: [master] 29 pages modified
lili668668 a57370b
GitBook: [master] one page modified
jstarry 44c7fd4
update the docs to specify that local agents do not incur serializati…
mkawalec 5d2e035
Add a note telling how to bypass the recursion limit of the html! mac…
codec-abc 9594b47
Add latest Stack Overflow survey results (#95)
amorriscode f9b776c
Mention prop_or macro (#97)
zoechi d1e36f8
Fix a typo. (#102)
teymour-aldridge 0ed66e3
Point to master branch for examples (#98)
darrenmeehan 3208a4b
Add code of conduct to documentation as well. (#104)
teymour-aldridge b183dc1
Added "" for the version at line 25 (#107)
nougator 201bb03
Removed periods and fixed spelling mistakes (#103)
dirkpuge b888b89
Shorten line lengths. (#106)
teymour-aldridge 044ed79
bumping up the yew version in Cargo.toml (#107) (#109)
hituzi-no-sippo a30f56a
Add #[derive(Clone)] in examples (#111)
Mingun 2bdbafc
Fix typo (#112)
FIGBERT 563216a
GitBook: [master] 29 pages modified
jstarry b7b5ab9
Merge remote-tracking branch 'docs/master' into merge-documentation
teymour-aldridge 6feef86
Update the doctest Github action.
teymour-aldridge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| root: ./docs/src |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Documentation tests | ||
| on: | ||
| push: | ||
| paths: | ||
| - "docs/**/*" | ||
| pull_request: | ||
| paths: | ||
| - "docs/**/*" | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Setup Rust | ||
| uses: actions-rs/toolchain@v1 | ||
| with: | ||
| toolchain: stable | ||
| target: wasm32-unknown-unknown | ||
| - name: Run tests | ||
| run: cd docs && cargo test | ||
| check-spelling: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Check spelling | ||
| run: bash ci/spellcheck.sh list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ orig.* | |
| /.idea | ||
| /.vscode | ||
| /cmake-build-debug | ||
| /docs/target | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,3 +57,4 @@ members = [ | |
| "examples/two_apps", | ||
| "examples/webgl", | ||
| ] | ||
| exclude=["docs"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| personal_ws-1.1 en 0 utf-8 | ||
| APIs | ||
| bindgen | ||
| interoperable | ||
| interoperability | ||
| libs | ||
| Libs | ||
| minimising | ||
| Optimisations | ||
| roadmap | ||
| README | ||
| stdweb | ||
| html | ||
| Roadmap | ||
| wasm | ||
| Wasm | ||
| WebAssembly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| #!/bin/bash | ||
|
|
||
| aspell --version | ||
|
|
||
| # Taken from the Rust Book (https://github.com/rust-lang/book/) | ||
|
|
||
| # Checks project Markdown files for spelling mistakes. | ||
|
|
||
| # Notes: | ||
|
|
||
| # This script needs dictionary file ($dict_filename) with project-specific | ||
| # valid words. If this file is missing, first invocation of a script generates | ||
| # a file of words considered typos at the moment. User should remove real typos | ||
| # from this file and leave only valid words. When script generates false | ||
| # positive after source modification, new valid word should be added | ||
| # to dictionary file. | ||
|
|
||
| # Default mode of this script is interactive. Each source file is scanned for | ||
| # typos. aspell opens window, suggesting fixes for each found typo. Original | ||
| # files with errors will be backed up to files with format "filename.md.bak". | ||
|
|
||
| # When running in CI, this script should be run in "list" mode (pass "list" | ||
| # as first argument). In this mode script scans all files and reports found | ||
| # errors. Exit code in this case depends on scan result: | ||
| # 1 if any errors found, | ||
| # 0 if all is clear. | ||
|
|
||
| # Script skips words with length less than or equal to 3. This helps to avoid | ||
| # some false positives. | ||
|
|
||
| # We can consider skipping source code in markdown files (```code```) to reduce | ||
| # rate of false positives, but then we lose ability to detect typos in code | ||
| # comments/strings etc. | ||
|
|
||
| shopt -s nullglob | ||
|
|
||
| dict_filename=./ci/dictionary.txt | ||
| markdown_sources=(./docs/**/*.md) | ||
| mode="check" | ||
|
|
||
| # aspell repeatedly modifies the personal dictionary for some reason, | ||
| # so we should use a copy of our dictionary. | ||
| dict_path="/tmp/dictionary.txt" | ||
|
|
||
| if [[ "$1" == "list" ]]; then | ||
| mode="list" | ||
| fi | ||
|
|
||
| # Error if running in list (CI) mode and there isn't a dictionary file; | ||
| # creating one in CI won't do any good :( | ||
| if [[ "$mode" == "list" && ! -f "$dict_filename" ]]; then | ||
| echo "No dictionary file found! A dictionary file is required in CI!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ ! -f "$dict_filename" ]]; then | ||
| # Pre-check mode: generates dictionary of words aspell consider typos. | ||
| # After user validates that this file contains only valid words, we can | ||
| # look for typos using this dictionary and some default aspell dictionary. | ||
| echo "Scanning files to generate dictionary file '$dict_filename'." | ||
| echo "Please check that it doesn't contain any misspellings." | ||
|
|
||
| echo "personal_ws-1.1 en 0 utf-8" > "$dict_filename" | ||
| cat "${markdown_sources[@]}" | aspell --ignore 3 list | sort -u >> "$dict_filename" | ||
| elif [[ "$mode" == "list" ]]; then | ||
| # List (default) mode: scan all files, report errors. | ||
| declare -i retval=0 | ||
|
|
||
| cp "$dict_filename" "$dict_path" | ||
|
|
||
| if [ ! -f $dict_path ]; then | ||
| retval=1 | ||
| exit "$retval" | ||
| fi | ||
|
|
||
| for fname in "${markdown_sources[@]}"; do | ||
| command=$(aspell --ignore 3 --personal="$dict_path" "$mode" < "$fname") | ||
| if [[ -n "$command" ]]; then | ||
| for error in $command; do | ||
| # FIXME: find more correct way to get line number | ||
| # (ideally from aspell). Now it can make some false positives, | ||
| # because it is just a grep. | ||
| grep --with-filename --line-number --color=always "$error" "$fname" | ||
| done | ||
| retval=1 | ||
| fi | ||
| done | ||
| exit "$retval" | ||
| elif [[ "$mode" == "check" ]]; then | ||
| # Interactive mode: fix typos. | ||
| cp "$dict_filename" "$dict_path" | ||
|
|
||
| if [ ! -f $dict_path ]; then | ||
| retval=1 | ||
| exit "$retval" | ||
| fi | ||
|
|
||
| for fname in "${markdown_sources[@]}"; do | ||
| aspell --ignore 3 --dont-backup --personal="$dict_path" "$mode" "$fname" | ||
| done | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [package] | ||
| name = "docs" | ||
| version = "0.1.0" | ||
| authors = ["Yew Maintainers <maintainers@yew.rs>"] | ||
| edition = "2018" | ||
|
|
||
| [dependencies] | ||
| doc-comment = "0.3.3" | ||
| wasm-bindgen = "0.2" | ||
| wasm-bindgen-test = "0.3.0" | ||
| wee_alloc = "0.4" | ||
| yew = { version = "0.16.0", features = ["wasm_test"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| Creative Commons Legal Code | ||
|
|
||
| CC0 1.0 Universal | ||
|
|
||
| CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE | ||
| LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN | ||
| ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS | ||
| INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES | ||
| REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS | ||
| PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM | ||
| THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED | ||
| HEREUNDER. | ||
|
|
||
| Statement of Purpose | ||
|
|
||
| The laws of most jurisdictions throughout the world automatically confer | ||
| exclusive Copyright and Related Rights (defined below) upon the creator | ||
| and subsequent owner(s) (each and all, an "owner") of an original work of | ||
| authorship and/or a database (each, a "Work"). | ||
|
|
||
| Certain owners wish to permanently relinquish those rights to a Work for | ||
| the purpose of contributing to a commons of creative, cultural and | ||
| scientific works ("Commons") that the public can reliably and without fear | ||
| of later claims of infringement build upon, modify, incorporate in other | ||
| works, reuse and redistribute as freely as possible in any form whatsoever | ||
| and for any purposes, including without limitation commercial purposes. | ||
| These owners may contribute to the Commons to promote the ideal of a free | ||
| culture and the further production of creative, cultural and scientific | ||
| works, or to gain reputation or greater distribution for their Work in | ||
| part through the use and efforts of others. | ||
|
|
||
| For these and/or other purposes and motivations, and without any | ||
| expectation of additional consideration or compensation, the person | ||
| associating CC0 with a Work (the "Affirmer"), to the extent that he or she | ||
| is an owner of Copyright and Related Rights in the Work, voluntarily | ||
| elects to apply CC0 to the Work and publicly distribute the Work under its | ||
| terms, with knowledge of his or her Copyright and Related Rights in the | ||
| Work and the meaning and intended legal effect of CC0 on those rights. | ||
|
|
||
| 1. Copyright and Related Rights. A Work made available under CC0 may be | ||
| protected by copyright and related or neighboring rights ("Copyright and | ||
| Related Rights"). Copyright and Related Rights include, but are not | ||
| limited to, the following: | ||
|
|
||
| i. the right to reproduce, adapt, distribute, perform, display, | ||
| communicate, and translate a Work; | ||
| ii. moral rights retained by the original author(s) and/or performer(s); | ||
| iii. publicity and privacy rights pertaining to a person's image or | ||
| likeness depicted in a Work; | ||
| iv. rights protecting against unfair competition in regards to a Work, | ||
| subject to the limitations in paragraph 4(a), below; | ||
| v. rights protecting the extraction, dissemination, use and reuse of data | ||
| in a Work; | ||
| vi. database rights (such as those arising under Directive 96/9/EC of the | ||
| European Parliament and of the Council of 11 March 1996 on the legal | ||
| protection of databases, and under any national implementation | ||
| thereof, including any amended or successor version of such | ||
| directive); and | ||
| vii. other similar, equivalent or corresponding rights throughout the | ||
| world based on applicable law or treaty, and any national | ||
| implementations thereof. | ||
|
|
||
| 2. Waiver. To the greatest extent permitted by, but not in contravention | ||
| of, applicable law, Affirmer hereby overtly, fully, permanently, | ||
| irrevocably and unconditionally waives, abandons, and surrenders all of | ||
| Affirmer's Copyright and Related Rights and associated claims and causes | ||
| of action, whether now known or unknown (including existing as well as | ||
| future claims and causes of action), in the Work (i) in all territories | ||
| worldwide, (ii) for the maximum duration provided by applicable law or | ||
| treaty (including future time extensions), (iii) in any current or future | ||
| medium and for any number of copies, and (iv) for any purpose whatsoever, | ||
| including without limitation commercial, advertising or promotional | ||
| purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each | ||
| member of the public at large and to the detriment of Affirmer's heirs and | ||
| successors, fully intending that such Waiver shall not be subject to | ||
| revocation, rescission, cancellation, termination, or any other legal or | ||
| equitable action to disrupt the quiet enjoyment of the Work by the public | ||
| as contemplated by Affirmer's express Statement of Purpose. | ||
|
|
||
| 3. Public License Fallback. Should any part of the Waiver for any reason | ||
| be judged legally invalid or ineffective under applicable law, then the | ||
| Waiver shall be preserved to the maximum extent permitted taking into | ||
| account Affirmer's express Statement of Purpose. In addition, to the | ||
| extent the Waiver is so judged Affirmer hereby grants to each affected | ||
| person a royalty-free, non transferable, non sublicensable, non exclusive, | ||
| irrevocable and unconditional license to exercise Affirmer's Copyright and | ||
| Related Rights in the Work (i) in all territories worldwide, (ii) for the | ||
| maximum duration provided by applicable law or treaty (including future | ||
| time extensions), (iii) in any current or future medium and for any number | ||
| of copies, and (iv) for any purpose whatsoever, including without | ||
| limitation commercial, advertising or promotional purposes (the | ||
| "License"). The License shall be deemed effective as of the date CC0 was | ||
| applied by Affirmer to the Work. Should any part of the License for any | ||
| reason be judged legally invalid or ineffective under applicable law, such | ||
| partial invalidity or ineffectiveness shall not invalidate the remainder | ||
| of the License, and in such case Affirmer hereby affirms that he or she | ||
| will not (i) exercise any of his or her remaining Copyright and Related | ||
| Rights in the Work or (ii) assert any associated claims and causes of | ||
| action with respect to the Work, in either case contrary to Affirmer's | ||
| express Statement of Purpose. | ||
|
|
||
| 4. Limitations and Disclaimers. | ||
|
|
||
| a. No trademark or patent rights held by Affirmer are waived, abandoned, | ||
| surrendered, licensed or otherwise affected by this document. | ||
| b. Affirmer offers the Work as-is and makes no representations or | ||
| warranties of any kind concerning the Work, express, implied, | ||
| statutory or otherwise, including without limitation warranties of | ||
| title, merchantability, fitness for a particular purpose, non | ||
| infringement, or the absence of latent or other defects, accuracy, or | ||
| the present or absence of errors, whether or not discoverable, all to | ||
| the greatest extent permissible under applicable law. | ||
| c. Affirmer disclaims responsibility for clearing rights of other persons | ||
| that may apply to the Work or any use thereof, including without | ||
| limitation any person's Copyright and Related Rights in the Work. | ||
| Further, Affirmer disclaims responsibility for obtaining any necessary | ||
| consents, permissions or other rights required for any use of the | ||
| Work. | ||
| d. Affirmer understands and acknowledges that Creative Commons is not a | ||
| party to this document and has no duty or obligation with respect to | ||
| this CC0 or use of the Work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Contributing to the documentation | ||
|
|
||
| Firstly, thanks for considering contributing to Yew. We're a friendly community of humans who | ||
| collaborate to build (hopefully) awesome software. We try to write software which is easy to use so | ||
| we ask that you follow a few guidelines when contributing – these are laid out in this document. | ||
|
|
||
| Note that this document is about *contributing documentation* not contributing code and only | ||
| applies to the contents of the `docs` folder – not any other parts of the project. | ||
|
|
||
| ## Can I just submit a PR or do I need to create an issue first? | ||
|
|
||
| PRs not attached to previously created issues are welcome *if* they're a small change. This could | ||
| be something like fixing a small grammar mistake or a typo. | ||
|
|
||
| If your PR is something bigger create an issue beforehand. This will save everyone time and effort: | ||
|
|
||
| 1. Multiple people don't end up submitting duplicate PRs doing the same thing. | ||
| 2. People have a chance to submit feedback on an idea *before* someone does a lot of work on it. | ||
| 3. It's easy to track progress on the development of the documentation. | ||
|
|
||
| ## Spelling and grammar | ||
|
|
||
| We recognise that not everyone who contributes to Yew will have "perfect" grammar or be a native | ||
| English speaker. We're all human; everyone makes mistakes and nobody will look down on you if you | ||
| make typos or grammar mistakes (we'll just fix them, merge PRs and move on with life). | ||
|
|
||
| To help catch spelling mistakes, we use a spellchecking script which originally came from the Rust | ||
| Book. If it picks up a spelling "mistake" which isn't actually a mistake, then please add it to the | ||
| list in `ci/dictionary.txt` (in alphabetically sorted order). | ||
|
|
||
| If in doubt about spelling, grammar or style you might find it useful to consult the | ||
| [Microsoft Style Guide](https://docs.microsoft.com/style-guide/) which we sometimes use as a handy | ||
| reference. | ||
|
|
||
| ## Line wrap | ||
| Having really long lines makes it hard to review code and see differences between versions. To | ||
| solve this problem all lines should be wrapped at 100 characters. | ||
|
|
||
| ## Building the book locally | ||
|
|
||
| Note that Yew uses Gitbook which renders differently from mdbook. However the latest Gitbook is | ||
| not compatible with gitbook-cli :( | ||
|
|
||
| ### Install mdbook: | ||
|
|
||
| ```bash | ||
| $ cargo install mdbook | ||
| ``` | ||
|
|
||
| ### Render and view the book: | ||
|
|
||
| ```bash | ||
| $ mdbook serve | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| use std::env; | ||
| use std::error::Error; | ||
| use std::fs; | ||
| use std::path::Path; | ||
|
|
||
| fn main() -> Result<(), Box<dyn Error>> { | ||
| let out_dir = env::var_os("OUT_DIR").unwrap(); | ||
| let src_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("src"); | ||
| let out_path = Path::new(&out_dir); | ||
|
|
||
| let original_path = src_path.join("getting-started/build-a-sample-app.md"); | ||
| let original_str = fs::read_to_string(original_path)?.replace("fn main", "fn _main"); | ||
| let sanitized_path = out_path.join("getting-started/build-a-sample-app.md"); | ||
| let _ignore = fs::create_dir(&out_path.join("getting-started")); | ||
| fs::write(sanitized_path, original_str)?; | ||
|
|
||
| println!("cargo:rerun-if-changed=build.rs"); | ||
| println!("cargo:rerun-if-changed=src/getting-started-build-a-simple-app.md"); | ||
|
|
||
| Ok(()) | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jstarry Just a note that I've added some contributing guidelines here.