arc42-generator icon indicating copy to clipboard operation
arc42-generator copied to clipboard

Change Markdown for Gitea

Open mwaeckerlin opened this issue 6 years ago • 7 comments

The tables don't work for gitea. The following kind of tables are currently generated (example from 05_building_block_view.md):

+-----------------------+-----------------------------------------------+
| **Name**              | **Responsibility**                            |
+=======================+===============================================+
| *\<black box 1\>*     |  *\<Text\>*                                   |
+-----------------------+-----------------------------------------------+
| *\<black box 2\>*     |  *\<Text\>*                                   |
+-----------------------+-----------------------------------------------+

This is not rendered as table in gitea. The following syntax does work in gitea:

| **Name**              | **Responsibility**                            |
|-----------------------|-----------------------------------------------|
| *\<black box 1\>*     |  *\<Text\>*                                   |
| *\<black box 2\>*     |  *\<Text\>*                                   |

There may be some other minor issues, e.g. link anchors dont't work ({#target}), but te table rendering is the most annoying problem.

Please either pdate the generator for this table format or provide an additional target for gitea.

For now, I run an sed command on the template to do the changes:

cd doc/architecture
for f in *.md; do
  echo "change $f";
  sed -i '/\(\+--\+\)\+/d;/\(\+==\+\)\+/{s/\+/|/g;s/=/-/g};s/ *{#[^}]*}\+//g' $f;
done

[EDIT] Markdown for tables in Gitea seems to follow this specification.

mwaeckerlin avatar Mar 02 '19 07:03 mwaeckerlin

Anybody else using gitea.io? Looks interesting, but I currently cannot estimate how widespread it's used...

@rdmueller - maybe it's interesting for docToolchain...

gernotstarke avatar Mar 02 '19 17:03 gernotstarke

I wonder if we should start to distribute the markdown version. with a bunch of flavour changing scripts 😁 what do you think?

rdmueller avatar Mar 02 '19 18:03 rdmueller

good idea... Marc's (@mwaeckerlin ) script seems a good start, at least for ix* users...

gernotstarke avatar Mar 02 '19 18:03 gernotstarke

so, it seems that pandoc supports six markdown flavours: https://pandoc.org/MANUAL.html#markdown-variants

We already use two of them and produce both a single- and multi-page version

@mwaeckerlin I guess you used the version found on the arc42.org download page? (the github flavoured md is afaik not linked yet)

rdmueller avatar Mar 02 '19 21:03 rdmueller

@rdmueller, sorry, you asked a question. Yes your guess is correct.

mwaeckerlin avatar Mar 13 '19 11:03 mwaeckerlin

@rdmueller

the github flavoured md is afaik not linked yet)

How to get the github flavoured version? Do I need to convert it by myself.

Would be great if it could also be linked.

schmunk42 avatar Jan 27 '22 09:01 schmunk42

@schmunk42 you will find all formats here: https://github.com/arc42/arc42-template/tree/master/dist

rdmueller avatar Jan 27 '22 09:01 rdmueller