You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules/setting
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>
2 years ago
..
actions.go Refactor the setting to make unit test easier (#22405) 2 years ago
admin.go Refactor the setting to make unit test easier (#22405) 2 years ago
api.go Refactor the setting to make unit test easier (#22405) 2 years ago
asset_dynamic.go Use a general approach to access custom/static/builtin assets (#24022) 2 years ago
asset_static.go Use a general approach to access custom/static/builtin assets (#24022) 2 years ago
attachment.go Add `.patch` to `attachment.ALLOWED_TYPES` (#23580) 2 years ago
cache.go Refactor the setting to make unit test easier (#22405) 2 years ago
camo.go Refactor the setting to make unit test easier (#22405) 2 years ago
config_provider.go Refactor config provider (#24245) 2 years ago
cors.go Fix incorrect CORS default values (#24206) 2 years ago
cron.go Refactor the setting to make unit test easier (#22405) 2 years ago
cron_test.go Refactor config provider (#24245) 2 years ago
database.go Move pidfile creation from setting to web cmd package (#23285) 2 years ago
database_sqlite.go Implement FSFE REUSE for golang files (#21840) 2 years ago
database_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
federation.go Refactor the setting to make unit test easier (#22405) 2 years ago
git.go Support reflogs (#22451) 2 years ago
highlight.go Refactor the setting to make unit test easier (#22405) 2 years ago
i18n.go Refactor the setting to make unit test easier (#22405) 2 years ago
incoming_email.go Refactor the setting to make unit test easier (#22405) 2 years ago
indexer.go Add meilisearch support (#23136) 2 years ago
indexer_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
lfs.go Refactor config provider (#24245) 2 years ago
log.go Refactor config provider (#24245) 2 years ago
mailer.go handle deprecated settings (#22992) 2 years ago
mailer_test.go Refactor config provider (#24245) 2 years ago
markup.go Add .livemd as a markdown extension (#22730) 2 years ago
metrics.go Refactor the setting to make unit test easier (#22405) 2 years ago
migrations.go Refactor the setting to make unit test easier (#22405) 2 years ago
mime_type_map.go Refactor the setting to make unit test easier (#22405) 2 years ago
mirror.go handle deprecated settings (#22992) 2 years ago
oauth2.go Refactor config provider (#24245) 2 years ago
other.go Refactor `setting.Other` and remove unused `SHOW_FOOTER_BRANDING` (#24270) 2 years ago
packages.go Refactor config provider (#24245) 2 years ago
packages_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
picture.go Refactor the setting to make unit test easier (#22405) 2 years ago
project.go Refactor the setting to make unit test easier (#22405) 2 years ago
proxy.go Refactor the setting to make unit test easier (#22405) 2 years ago
queue.go Refactor config provider (#24245) 2 years ago
repository.go Add .livemd as a markdown extension (#22730) 2 years ago
security.go Refactor config provider (#24245) 2 years ago
server.go handle deprecated settings (#22992) 2 years ago
service.go Refactor the setting to make unit test easier (#22405) 2 years ago
session.go Refactor cookie (#24107) 2 years ago
setting.go Refactor config provider (#24245) 2 years ago
setting_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
ssh.go Prefer native parser for SSH public key parsing (#23798) 2 years ago
storage.go Refactor config provider (#24245) 2 years ago
storage_test.go Refactor config provider (#24245) 2 years ago
task.go handle deprecated settings (#22992) 2 years ago
time.go Refactor the setting to make unit test easier (#22405) 2 years ago
ui.go Don't set meta `theme-color` by default (#24340) 2 years ago
webhook.go Refactor the setting to make unit test easier (#22405) 2 years ago