Skip to content

Rewrite the guides to Markdown - #450

Open
jsmitka wants to merge 4 commits into
pyvec:masterfrom
jsmitka:markdown-guides
Open

Rewrite the guides to Markdown#450
jsmitka wants to merge 4 commits into
pyvec:masterfrom
jsmitka:markdown-guides

Conversation

@jsmitka

Copy link
Copy Markdown
Contributor

In the spirit of #434, I rewrote all the pages under "guides" to markdown. If this gets accepted, I can continue to rewrite the rest of the docs.

However, if we end up using MkDocs, please note that MyST (the markdown parser for Sphinx) use a different syntax than MkDocs for several elements:

  • Extra properties of Images: MyST vs Material for MkDocs
  • Admonitions - notes, warnings, etc.: MyST vs Material for MkDocs
  • Cross-references: MyST vs regular links with anchors in MkDocs (there might be another solution I am not aware of).
  • Custom in-line roles: {slack}`<...>`, {twitter}`<...>`, {gh-repo}`<...>` - those will need to be re-implemented as plugins, or just rewritten as plain links (might be an better option).
  • Source comments: MyST vs HTML comments in PyMdown extensions.

There might be more differences, but these are the ones I run into. Additonal work will be needed to get it working properly under MkDocs.

linkify extra was added to the `myst-parser` dependency and `uv.lock`
was updated accordingly.
Please note that the MyST syntax of several elements (e.g., admonitions,
images, cross-references etc.) is different from the syntax used by
MkDocs.
@encukou

Copy link
Copy Markdown
Member

Dělím review po kousíčkách, kdybyste se k tomu dostal někdo jiný tak začněte odspodu a dejte vědět :)

Comment threaddocs/guides/high-school-class.md Outdated
Comment threaddocs/guides/promotion.md Outdated
Comment threaddocs/conf.py
Comment on lines +152 to +154
"dollarmath",
"deflist",
"linkify",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use math.
Linkify makes some questionable choices; let's enable it separately if needed.

Suggested change
"dollarmath",
"deflist",
"linkify",
"deflist",

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@encukou I added linkify because it could make things easier for contributors with less experience, since GitHub offers a similar behaviour. Maybe setting myst_linkify_fuzzy_links=False (docs) would be the middle ground between making things easier and not making it annoying?

https://www.python.org -> would be converted to a link
www.python.org -> not converted (GH converts it)

Comment threadpyproject.toml
"click==8.2.1",
"jinja2==3.1.6",
"myst-parser==4.0.1",
"myst-parser[linkify]==4.0.1",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave out linkify for now.

@encukou

Copy link
Copy Markdown
Member

Vypadá to skvěle, našel jsem pár drobností

(sorry za switching jazyků, nepsal jsem to najednou :)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@honzajavorek

Copy link
Copy Markdown
Member

Já jsem pro myst_linkify_fuzzy_links=False nebo bez Linkify, protože to pak bude konvertovat odkazy implicitně a mohly by vzniknout nezamýšlené odkazy, na kterých pak spadne link checker. Ale záleží, co to reálně udělá. Za mě lepší explicit než implicit, myslím že mít tam protokol by mohlo být dostatečně explicit.

@honzajavorekhonzajavorek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tak jsem na to mrknul! Spousta práce! Super!

  • V hlavní větvi proběhly nějaké změny, tak je potřeba udělat rebase
  • S tím linkify bych to viděl aspoň na to fuzzy false nastavení.

Když to bude vyřešené, mergnul bych to! Tyto věci bych řešil spíš někdy v budoucnu:

  • Vidím, že texty jsou prošpikované dt/dd (definition list), čemuž bych se dnes už asi vyhnul, ale nemusíme to řešit v rámci tohoto PR. Trochu souvisí i s #121
  • Jsou tam mrtvé návody, ale nemusíme to řešit v rámci tohoto PR, založil jsem separé issues.

Comment threaddocs/guides/meetup.md

# Jak pořádat Python sraz (Pyvo)

% Protože Sphinx umožňuje odkazování napříč dokumenty, hodí se mít názvy odkazů unikátní. Z toho důvodu všechny odkazy v této příručce začínají 'srazy-'.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Myslím, že by mohlo být pro většinu lidí viditelnější a srozumitelnější, kdyby to byl obyč HTML komentář:

Suggested change
% Protože Sphinx umožňuje odkazování napříč dokumenty, hodí se mít názvy odkazů unikátní. Z toho důvodu všechny odkazy v této příručce začínají 'srazy-'.
<!--
Protože Sphinx umožňuje odkazování napříč dokumenty, hodí se mít názvy odkazů unikátní. Z toho důvodu všechny odkazy v této příručce začínají 'srazy-'.
-->

@@ -0,0 +1,27 @@
# Jak učit Python na střední škole

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH #462 😅

@@ -1,8 +1,8 @@
Jak v ČR pořádat Django Girls

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH #461 😅

Comment threaddocs/guides/meetup.md

### Přicházím na místo konání

**Příchod**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could have these as regular H4s?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asi to nemusíme řešit teď, vidím, že ve spoustě těch návodů by se dalo předělávat a opravovat markup. Nemíchejme to teď s překlopením syntaxe.

## How to ask / vote on questions

1) Go to `www.sli.do` and use ``#pyconcz`` code to join the event
1) Go to *www.sli.do* and use ``#pyconcz`` code to join the event

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ve skutečnosti dnes už https://www.slido.com/

## How to moderate

1) Go to `www.sli.do` and log in (ask for credentials if you don't have them,
1) Go to *www.sli.do* and log in (ask for credentials if you don't have them,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dtto

@encukou

Copy link
Copy Markdown
Member

@jsmitka, chceš to dotáhnout nebo to mám převzít?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jsmitka@encukou@honzajavorek