0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 05:34:27 +01:00
gitea/modules
contra-bit 58caf422e6
Add .livemd as a markdown extension (#22730)
## Needs and benefits
[Livebook](https://livebook.dev/) notebooks are used for code
documentation and for deep dives and note-taking in the elixir
ecosystem. Rendering these in these as Markdown on frogejo has many
benefits, since livemd is a subset of markdown. Some of the benefits
are:
- New users of elixir and livebook are scared by unformated .livemd
files, but are shown what they expect
- Sharing a notebook is as easy as sharing a link, no need to install
the software in order to see the results.

[goldmark-meraid ](https://github.com/abhinav/goldmark-mermaid) is a
mermaid-js parser already included in gitea. This makes the .livemd
rendering integration feature complete. With this PR class diagrams, ER
Diagrams, flow charts and much more will be rendered perfectly.

With the additional functionality gitea will be an ideal tool for
sharing resources with fellow software engineers working in the elixir
ecosystem. Allowing the git forge to be used without needing to install
any software.

## Feature Description
This issue requests the .livemd extension to be added as a Markdown
language extension.

- `.livemd` is the extension of Livebook which is an Elixir version of
Jupyter Notebook.
- `.livemd` is` a subset of Markdown.

This would require the .livemd to be recognized as a markdown file. The
Goldmark the markdown parser should handle the parsing and rendering
automatically.

Here is the corresponding commit for GitHub linguist:
https://github.com/github/linguist/pull/5672

Here is a sample page of a livemd file:

https://github.com/github/linguist/blob/master/samples/Markdown/livebook.livemd

## Screenshots

The first screenshot shows how github shows the sample .livemd in the
browser.
The second screenshot shows how mermaid js, renders my development
notebook and its corresponding ER Diagram. The source code can be found
here:
79615f7428/termiNotes.livemd

## Testing
I just changed the file extension from `.livemd`to `.md`and the document
already renders perfectly on codeberg. Check you can it out
[here](https://codeberg.org/lgh/Termi/src/branch/livemd2md/termiNotes.md)

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-04-26 11:22:54 -04:00
..
actions show workflow config error on file view also (#24267) 2023-04-22 22:16:54 -04:00
activitypub
analyze
assetfs Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
auth Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
avatar Allow webp images as avatars (#24248) 2023-04-21 13:15:49 -04:00
base Use a general Eval function for expressions in templates. (#23927) 2023-04-07 21:25:49 +08:00
cache Update redis library to support redis v7 (#24114) 2023-04-13 18:41:04 -04:00
charset Update go tool dependencies, restructure lint targets (#24239) 2023-04-22 14:53:00 -04:00
container
context Fix wrong error info in RepoRefForAPI (#24344) 2023-04-26 04:14:35 -04:00
csv Refactor locale number (#24134) 2023-04-17 11:37:23 +08:00
doctor Enable forbidigo linter (#24278) 2023-04-24 05:50:58 -04:00
emoji
eventsource
generate
git Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
gitgraph Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
graceful Remove most path-based golangci exclusions (#24214) 2023-04-19 22:08:01 -04:00
hcaptcha
highlight test_env: hardcode major go version in use (#23464) 2023-03-14 16:09:01 -04:00
hostmatcher
html
httpcache Set X-Gitea-Debug header once (#23361) 2023-03-08 15:40:04 -05:00
httplib Refactor internal API for git commands, use meaningful messages instead of "Internal Server Error" (#23687) 2023-03-29 14:32:26 +08:00
indexer Refactor config provider (#24245) 2023-04-25 23:06:39 +08:00
issue/template
json
label Make label templates have consistent behavior and priority (#23749) 2023-04-10 16:44:02 +08:00
lfs Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
log Enable forbidigo linter (#24278) 2023-04-24 05:50:58 -04:00
markup Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
mcaptcha
metrics include build info in Prometheus metrics (#22819) 2023-02-08 19:54:01 +02:00
migration Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
mirror
nosql Update redis library to support redis v7 (#24114) 2023-04-13 18:41:04 -04:00
notification
options Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
packages Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
paginator Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
pprof
private Fix incorrect internal response type (#24173) 2023-04-17 23:10:40 -04:00
process
proxy Use proxy for pull mirror (#22771) 2023-02-11 08:39:50 +08:00
proxyprotocol
public Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
queue Enable forbidigo linter (#24278) 2023-04-24 05:50:58 -04:00
recaptcha
references
regexplru
repository Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
secret Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
session Update redis library to support redis v7 (#24114) 2023-04-13 18:41:04 -04:00
setting Add .livemd as a markdown extension (#22730) 2023-04-26 11:22:54 -04:00
sitemap
ssh
storage Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
structs Display when a repo was archived (#22664) 2023-04-26 10:46:26 -04:00
svg Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
sync
system
templates Remove unnecessary helper function DateFmtLong (#24343) 2023-04-26 02:52:50 -04:00
test Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
timeutil Fix template function DateTime (#24317) 2023-04-25 15:48:30 -04:00
translation Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
turnstile
typesniffer Do not recognize text files as audio (#23355) 2023-03-07 22:40:41 -05:00
updatechecker
upload
uri
user
util Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
validation Map OIDC groups to Orgs/Teams (#21441) 2023-02-08 14:44:42 +08:00
web Enable forbidigo linter (#24278) 2023-04-24 05:50:58 -04:00
webhook