Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gnoweb] Render markdown from .md files in packages instead of displaying raw content #2494

Closed
leohhhn opened this issue Jul 3, 2024 · 1 comment
Assignees
Labels
🌍 gnoweb Issues & PRs related to gnoweb and render 🗺️good first issue🗺️ Ideal for newcomer contributors

Comments

@leohhhn
Copy link
Contributor

leohhhn commented Jul 3, 2024

Description

We can upload README.md files inside Gno packages and since recently they are visible in gnoweb, it would be great if we can render the markdown instead of displaying the raw content.

Here's an example of .md on chain.

@moul moul added the 🗺️good first issue🗺️ Ideal for newcomer contributors label Jul 4, 2024
@leohhhn leohhhn added the 🌍 gnoweb Issues & PRs related to gnoweb and render label Jul 4, 2024
@alexiscolin alexiscolin self-assigned this Jul 6, 2024
zivkovicmilos pushed a commit that referenced this issue Aug 15, 2024
<!-- please provide a detailed description of the changes made in this
pull request. -->
This PR aims to solves #2494 in order to parse `markdown` files from
packages templates. It currently uses the file extension (from
`window.location`) to detect if the content is a `md` file in a package
template.

_Although keeping the extension in the url is not a good practice for
SEO & UX (because we are using pretty URLs for some other contents and
are not consistent throughout gnoweb), This should do the work for now
as short term solution since we are gonna parse `.md` from `go` soon
with the new gnoweb design/codebase refactor (cc @gfanton)._

It also improves the package file template by removing global JS and
pushing the `source` content into the main rendering flow from
`renderer.js`.
MikaelVallenet pushed a commit to MikaelVallenet/gno that referenced this issue Aug 17, 2024
<!-- please provide a detailed description of the changes made in this
pull request. -->
This PR aims to solves gnolang#2494 in order to parse `markdown` files from
packages templates. It currently uses the file extension (from
`window.location`) to detect if the content is a `md` file in a package
template.

_Although keeping the extension in the url is not a good practice for
SEO & UX (because we are using pretty URLs for some other contents and
are not consistent throughout gnoweb), This should do the work for now
as short term solution since we are gonna parse `.md` from `go` soon
with the new gnoweb design/codebase refactor (cc @gfanton)._

It also improves the package file template by removing global JS and
pushing the `source` content into the main rendering flow from
`renderer.js`.
@leohhhn
Copy link
Contributor Author

leohhhn commented Aug 27, 2024

Closed by #2540. We should also consider the case where the user might want to actually see the raw markdown content, but that is for gnoweb v2. @alexiscolin

@leohhhn leohhhn closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌍 gnoweb Issues & PRs related to gnoweb and render 🗺️good first issue🗺️ Ideal for newcomer contributors
Projects
Development

No branches or pull requests

3 participants