arc42 / arc42-generator

a gradle build to generate all derived templates from arc42-master
MIT License
46 stars 13 forks source link

Change Markdown for Gitea #31

Open mwaeckerlin opened 5 years ago

mwaeckerlin commented 5 years ago

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.

gernotstarke commented 5 years ago

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

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

rdmueller commented 5 years ago

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

gernotstarke commented 5 years ago

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

rdmueller commented 5 years ago

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)

mwaeckerlin commented 5 years ago

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

schmunk42 commented 2 years ago

@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.

rdmueller commented 2 years ago

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