Commit graph

14 commits

Author SHA1 Message Date
Chris-san
e5d3185abf
forc doc: Generate dependency documentation (#4546)
## Description

Generates the documentation for dependencies & small improvements to the
API.

These changes **DO NOT** create links between dependency docs and the main docs, but generates the dependency docs and ensures there are no conflicts when generating these docs.

What's new so far:
- [x] Programs get their own folders, just like `cargo doc`
- [x] Generates documentation for dependencies by default: Closes #4533 
- [x] Fixes possible conflict with `assets` folder: Closes #4545 
- [x] Removes old docs before generating new ones: Closes #4544 

## Checklist

- [x] I have linked to any relevant issues. 
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: Chris O'Brien <eureka@noctua.attlocal.net>
2023-05-22 21:27:32 +03:00
Mohammad Yasir
800089eb62
Updated the sway.js file by adding mod and type in keyword (#4427)
## Description
fixes #4424 
closes #4424 


## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
2023-04-12 22:39:45 +00:00
AndrésF
63382365bd
doc: Adding annotations support on highlight.js (#4186)
## Description

resolves #2740
closes #4157

> In order to give a better highlighting I picked the "meta" scope as
seen in [highlight.js
docs](https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html)
> 
> The ["Mode"
](https://highlightjs.readthedocs.io/en/latest/language-guide.html) I've
added provides the html class: _hljs-meta_ however, the result is a
white color for annotation (like plain text) and not a blue color as
requested in the issue.
> 
> The solution I've found for this is to add an additional css file to
specify custom behavior for the desired class. I haven't added this file
because I think it's out of scope.


## Checklist

- [ ] I have linked to any relevant issues.
- [ ?] I have commented my code, particularly in hard-to-understand
areas.
- [ ?] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ?] I have added tests that prove my fix is effective or that my
feature works.
- [] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel
Labs Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ?] I have requested a review from the relevant team or maintainers.

Co-authored-by: Mohammad Fawaz <mohammadfawaz89@gmail.com>
2023-03-10 15:24:50 +00:00
Chris O'Brien
af217d0943
Add syntax highlighting to code blocks in forc doc (#4176)
## Description
Applies the ayu theme to `<pre>` wrapped code blocks using the
`highlight.js` file used in the markdown books.

![Screenshot from 2023-02-23
19-55-31](https://user-images.githubusercontent.com/57543709/221073023-9209d927-febf-4cb7-bf90-13302596af4d.png)


## Checklist

- [x] I have linked to any relevant issues. Closes #4175 
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
2023-02-24 02:12:42 +00:00
David Ma
02d9b3d31c
Fix highlightjs/build.sh to point to correct directories (#3632) 2022-12-19 08:36:35 -05:00
Joshua Batty
58f2021ad0
Add some missing keywords for mdBook syntax highlighting (#2903)
Add some missing keywords to the `sway.js` file. This was triggered by
@Braqzen noticing some inconsistent highlighting in the generated MD
books.

Doesn't address custom types not being highlighted but that can be for a
future PR.
2022-09-29 23:23:06 -05:00
John Adler
fddb2067dd
Create markdown-lint.yml (#2534)
* Create markdown-lint.yml

* Fix lint errors.
2022-08-15 12:45:07 -04:00
r-sitko
e06e9933ca
#2039 - add storage keyword highlighting in book (#2141)
* #2039 - add storage keyword highlighting in book

* Changes after review

Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
2022-06-28 16:12:52 +00:00
John Adler
e3ac9c4eca
Add more highlighted languages (#1699)
* Clean up build script.

* Regenerate highlight.js file with shell.

* Add JSON to build script.

* Add JSON.

* Use 11.3.1.
2022-05-26 17:26:37 -04:00
John Adler
734d383453
Add toml syntax highlighting. (#551) 2022-01-01 18:05:16 -05:00
John Adler
da7cf05677
Add Rust syntax highlighting (#547)
* Add Rust to built languages.

* Update highlight.js file.
2022-01-01 11:05:35 -05:00
John Adler
d242ba047d
Update manifest files (#479)
* Update authors.

* Add more fields.

* Update highligh.js gen script author.

* Update author on Forc manifest files.

* Change author on missed files too, and fix formatting.

* Fix typo from merge.
2021-12-23 14:08:12 -05:00
alex-matthe
e8f381592d
Update syntax highlighting (#426)
* Update highlighted data types

* Update keywords

* Add highlight.js bundled file

* Fix types

Co-authored-by: Alexandru Matei <alexandrumatei3693@gmail.com>
2021-12-07 14:18:58 +02:00
Elvis
919c18c98f
added sway highlight.js (#129)
* added sway highlight.js

* added higlightjs/sway and its build script

* added initial prism for sway

* added script for prism

* added prism-sway and instructions

* rename to all caps

* update build scripts

* added missing dots
2021-08-02 19:09:28 +02:00