Commit graph

58 commits

Author SHA1 Message Date
Andrey Makarov
417b90a7e5
Improve Markdown code blocks & start moving docs to Markdown style (#19954)
- add additional parameters parsing (other implementations will just
  ignore them). E.g. if in RST we have:

  .. code:: nim
     :test: "nim c $1"

     ...

  then in Markdown that will be:

  ```nim test="nim c $1"
  ...
  ```

- implement Markdown interpretation of additional indentation which is
  less than 4 spaces (>=4 spaces is a code block but it's not
implemented yet). RST interpretes it as quoted block, for Markdown it's
just normal paragraphs.
- add separate `md2html` and `md2tex` commands. This is to separate
  Markdown behavior in cases when it diverges w.r.t. RST significantly —
most conspicously like in the case of additional indentation above, and
also currently the contradicting inline rule of Markdown is also turned
on only in `md2html` and `md2tex`. **Rationale:** mixing Markdown and
RST arbitrarily is a way to nowhere, we need to provide a way to fix the
particular behavior. Note that still all commands have **both** Markdown
and RST features **enabled**. In this PR `*.nim` files can be processed
only in Markdown mode, while `md2html` is for `*.md` files and
`rst2html` for `*.rst` files.
- rename `*.rst` files to `.*md` as our current default behavior is
  already Markdown-ish
- convert code blocks in `docgen.rst` to Markdown style as an example.
  Other code blocks will be converted in the follow-up PRs
- fix indentation inside Markdown code blocks — additional indentation
  is preserved there
- allow more than 3 backticks open/close blocks (tildas \~ are still not
  allowed to avoid conflict with RST adornment headings) see also
https://github.com/nim-lang/RFCs/issues/355
- better error messages
- (other) fix a bug that admonitions cannot be used in sandbox mode; fix
  annoying warning on line 2711
2022-07-15 19:27:54 +02:00
flywind
415689323c
clarify how to restart CI (#19845) 2022-06-08 18:17:25 +02:00
flywind
faacd63bf6
the title of PR should contain a brief description (#19211)
In addition to an issue number, the title of a PR should contain a brief description; then users can follow the progress more easily from the title.
2021-12-06 10:04:54 +01:00
Andreas Rumpf
f86a530214
breaking changes policies (#18541)
* document some std library evolution policies

In wanting to improve the standard library, it's helpful to have a set
of principles and guidelines to lean back on, that show how to introduce
such improvements while at the same time considering existing users of
the language.

A key idea behind documentation of this sort is that it should highlight
a path forwards in making changes rather than trying to prevent them,
and although the current snippet does include some language for what one
shouldn't do, it also shows a few options for what one can do.

This is a riff on https://github.com/nim-lang/Nim/pull/18468 mainly
based on what helps enable to the use of Nim productively in
environments and teams where the priority and focus is not always on the
tool (Nim in this case) but rather on the codebase itself, and its use
by end users.

We use similar guidance documentation to help coordinate the code of the
teams using Nim in https://status-im.github.io/nim-style-guide/ where it
is applied not as law, but rather as recommendations for the default
approach that should be considered first.

* document the new policies

* typo

* Update doc/contributing.rst

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update doc/contributing.rst

* Update doc/contributing.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/contributing.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/contributing.rst

* Update doc/contributing.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* clarify some things

* Update doc/contributing.rst

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-07-21 10:22:30 +02:00
narimiran
60b4fa71a8 [ci skip] correctly explain how to use [backport] tags 2021-05-12 13:57:43 +02:00
Timothee Cour
b667e288e2
move travis, appveyor, ci.yml.disabled to unmaintained/ (#17828)
* move travis, appveyor, ci.yml.disabled to unmaintained

* update some mentions of travis, appevyor

* fix test
2021-04-24 07:54:31 +02:00
Andrey Makarov
8f79bc5f3d
add RST highlighting for command line / shells (also fixes #16858) (#17789) 2021-04-21 16:57:54 +02:00
Timothee Cour
fb02b56957
support skip ci in azure pipelines, and support it properly in github actions pipelines (#17561)
* support skip ci in azure pipelines

* [skip ci] example of a commit that skips CI

* example of a commit that does not skip CI

* fix github actions logic for ci skip handling

* [skip ci] example of a commit that skips CI for all pipelines

* example of a commit that does not skip CI for any pipeline
2021-04-20 09:01:53 +02:00
Andrey Makarov
e35946f306
enable syntax highlighting for inline code (#17585)
* enable syntax highlighting for inline code

* finish '.. default-role' and preliminary '.. role'

implementation

* more compact check in dirRole

* set :literal: as default role for *.rst

* Update lib/packages/docutils/rst.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* use whichRole for setting currRoleKind

* Update lib/packages/docutils/rst.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* rename rnGeneralRole -> rnUnknownRole

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-04-02 22:11:44 +02:00
Andrey Makarov
861c42c258
RST: enable parsing of prefix roles (ref #17340) (#17514) 2021-03-29 18:32:49 +02:00
Timothee Cour
b755060f9c
docs contributing: mention https://man.sr.ht/builds.sr.ht/build-ssh.md for ssh to CI machines (#17409) 2021-03-18 02:35:08 -07:00
Andrey Makarov
d97bf4f1c8
fix RST parsing when no indent after enum.item (fix #17249) (#17257) 2021-03-12 08:33:21 +01:00
Timothee Cour
4f10dde64a
followup #17077: also use assert instead of doAssert for code-block rst blocks intended to be used as runnableExamples (#17122) 2021-02-21 23:44:32 +08:00
Timothee Cour
148e5ba2a5
contributing: prefer assert to doAssert in runnableExamples (#17077) 2021-02-18 13:19:38 -08:00
Timothee Cour
190fe36eba
rst: single backticks now render correctly in both rst2html and github (#17028)
* rst: `` => `
* support default-role in rst2html
* update docstyle regarding single vs double backticks
2021-02-13 09:30:23 +01:00
Elliot Waite
0436a7cffd
Make small text changes in the docs (#16634)
* Fix broken links in docs

* Fix rand HSlice links

* Make small text changes in the docs

* Fix typo in contributing docs
2021-01-25 14:59:19 +01:00
flywind
4a479f4a6e
update contributing.rst (#16530)
* update docs

* Apply suggestions from code review

* Update doc/contributing.rst
2021-01-01 18:33:35 +01:00
flywind
b57df6d0b3
Don't use unittest.suite and unittest.test (#16464) 2020-12-27 10:15:57 +01:00
Timothee Cour
44442520bc
fix numbering in contributing.rst (#16042) 2020-11-18 19:41:01 -08:00
Timothee Cour
bf8421a2fc
contributing docs: always mentioned referenced issues in PR body (#16038) 2020-11-18 23:29:32 +01:00
narimiran
b831033db6 remove codeowners [ci skip] 2020-11-11 14:02:35 +01:00
Yanis Zafirópulos
ae8eb1ec3d
Copy editing (#15733)
* Minor fixes

* Minor fixes

* Minor fixes

* Minor fixes
2020-10-26 13:47:33 -04:00
narimiran
0a686659d2 it is not "eg", it is "e.g." 2020-10-20 10:47:43 +02:00
Timothee Cour
67afe72e9c
contributing docs: add instructions for economically restarting failed CI jobs, debugging failed CI (#15576)
* contributing docs: add instructions for economically restarting failed CI jobs, debugging failed CI

* fixup
2020-10-19 14:49:06 +02:00
Timothee Cour
7526472a6e
add a section on naming new stdlib module names (#15590) 2020-10-19 14:14:43 +02:00
Timothee Cour
4dfb062f4d
update contributing.rst and docstyle.rst: refer to a bug via bug #1234 + other guidelines (#14796)
* add a testing convention in nep1
* misc updates to contributing.rst and docstyle.rst
* address comments
2020-06-26 10:40:34 +02:00
Andreas Rumpf
3a2697dd73
drnim: tiny progress (#13882)
* drnim: tiny progress
* refactoring complete
* drnim: prove .ensures annotations
* Moved code around to avoid code duplication
* drnim: first implementation of the 'old' property
* drnim: be precise about the assignment statement
* first implementation of --assumeUnique
* progress on forall/exists handling
2020-04-15 20:03:25 +02:00
Araq
8279da5219 contributing.rst: Add a special rule for 'outplace'-like features 2020-02-05 13:39:08 +01:00
Timothee Cour
981ffc912e contributing docs: symbols need package prefix; changed allocStats to nimAllocStats (#13247) 2020-01-25 09:27:29 +01:00
Timothee Cour
6c2214b7de followup on #10435 : should be diff, not show (#13162) 2020-01-17 16:56:21 +01:00
Araq
fd5aa89304 added guidelines for evolving Nim's stdlib 2019-12-24 17:33:27 +01:00
Araq
2616a86d4b docs: tiny style improvements 2019-12-24 17:33:27 +01:00
Jjp137
3ad48069d3 Fix word wrapping 2019-10-22 17:59:12 -07:00
Jjp137
72147c9ba4 Prefer relative links for Nim documentation
This is more friendly to those browsing the documentation without
a network connection. The nim-doc package in Debian allows this,
for example.

Also, the domain name being used was not consistent. It could have
been either nim-lang.org or nim-lang.github.io, and those reading
the stable docs could have found themselves suddenly reading the
devel docs instead.
2019-10-22 17:59:12 -07:00
Jjp137
93461aee34 Fix many broken links
Note that contrary to what docgen.rst currently says, the ids have
to match exactly or else most web browsers will not jump to the
intended symbol.
2019-10-22 17:59:12 -07:00
Andreas Rumpf
5f44651769 updated the contributing.rst guidelines 2019-09-25 15:01:35 +02:00
Andreas Rumpf
765ff4b67b contributing.rst guide: Make the rules reflect the reality. 2019-06-27 21:28:53 +02:00
narimiran
b70fd0400e [other] introduce a separate changelog for backports, update
contributing guidelines
2019-06-17 12:15:47 +02:00
Andreas Rumpf
2c03c9f42e updates the contributing guidelines [other] 2019-06-07 16:21:01 +02:00
Timothee Cour
f7a0a42b05 fixup 2019-02-05 17:45:30 -08:00
Timothee Cour
86f4dae748 [doc] lots of fixes in doc/contributing.rst and doc/docstyle.rst 2019-02-05 17:19:29 -08:00
Timothee Cour
5fa8a61a23 add git diff hints to help with reviews (#10435) 2019-01-28 07:10:20 +01:00
Federico Ceratto
87fce94d65 Add "cmd" description, minor improvements (#10436) 2019-01-25 11:29:46 +01:00
Miran
44923a1b1f fix #10287 (#10448)
The only thing separating these two files
(which wrongly appear on index.html as modules)
and the rest of the (correctly placed)
documents was the style of the title :D
2019-01-25 08:34:02 +01:00
Federico Ceratto
15ee5d65d1 Add koch run example (#10434) 2019-01-24 11:24:58 +01:00
Andreas Rumpf
c682671fea minor cleanups 2018-12-11 23:07:36 +01:00
Randy Smith
6c7abe6e5b Fixes #9671 (#9750) 2018-11-19 09:22:21 +01:00
Araq
b138e89772 contributing guide: document the new [backport] convention 2018-10-30 22:45:38 +01:00
Timothee Cour
d0dd5ea887 [doc] add tips to doc/contributing.rst: git, code review, CI (#9429) 2018-10-19 21:03:25 +02:00
Timothee Cour
15dbd973de [doc] start of best practices section in contributing.rst (#9415) 2018-10-18 20:20:26 +02:00