ziglang/ziglang.org
14
29
Fork
You've already forked ziglang.org
31

Reading the Zig Language Reference #623

Closed
opened 2026年05月29日 09:38:48 +02:00 by simenandre · 4 comments

Hello 👋

I am currently reading through the Zig Language Reference cover to cover, and having used fragment identifiers in the URL (e.g. #Peer-Type-Resolution) as a makeshift bookmark, I realised a better way to consume it is a on my reading tablet. A few hours later, I got this working: https://codeberg.org/simenandre/ziglang-docs-epub

I always thought the language reference should be in multiple formats, like man pages, txt etc. I know we can all use pandoc or something similar to convert to a lot of formats. The result from direct conversion is likely not great, when I made the epub, the sidebar became a thing. Good user experiences pays off :)

If you want to link to the epub files somewhere, feel free <3

Hello 👋 I am currently reading through the Zig Language Reference cover to cover, and having used fragment identifiers in the URL (e.g. `#Peer-Type-Resolution`) as a makeshift bookmark, I realised a better way to consume it is a on my reading tablet. A few hours later, I got this working: https://codeberg.org/simenandre/ziglang-docs-epub I always thought the language reference should be in multiple formats, like man pages, txt etc. I know we can all use `pandoc` or something similar to convert to a lot of formats. The result from direct conversion is likely not great, when I made the epub, the sidebar became a thing. Good user experiences pays off :) If you want to link to the epub files somewhere, feel free <3

I'd like to also bring to the attention of the team, that the language reference page is laggy on phone view, and can end up just crashing the browser.

As well, regarding the multiple output formats, EPUB is really nice, something I feel it could help is maybe using AsciiDoc, or even Typst.

  • AsciiDoc it's quite stablished with its output formats, this includes HTML, PDF, MAN, and EPUB. where they can be obviously stylized and have them in a book format/type, with automatic ToC, etc.
  • Typst is quite similar, except it's more specialized in PDF and HTML is experimental, and EPUB is somewhat proposed.

If possible, I'd like to showcase a very little MVP of how it could look with AsciiDoc mostly, Typst would be worth if PDF was the first target rather than HTML (being experimental).


Also, a bit related to the generation of this language reference, I'm wondering about the templating engine to produce, whether it could be considered to be part of the standard library, just like Go has html/template and text/template.

I'd like to also bring to the attention of the team, that the language reference page is laggy on phone view, and can end up just crashing the browser. As well, regarding the multiple output formats, EPUB is really nice, something I feel it could help is maybe using AsciiDoc, or even Typst. - AsciiDoc it's quite stablished with its output formats, this includes HTML, PDF, MAN, and EPUB. where they can be obviously stylized and have them in a _book_ format/type, with automatic ToC, etc. - Typst is quite similar, except it's more specialized in PDF and HTML is experimental, and EPUB is somewhat proposed. If possible, I'd like to showcase a very little MVP of how it could look with AsciiDoc mostly, Typst would be worth if PDF was the first target rather than HTML (being experimental). --- Also, a bit related to the generation of this language reference, I'm wondering about the templating engine to produce, whether it could be considered to be part of the standard library, just like Go has `html/template` and `text/template`.

I'd like to also bring to the attention of the team, that the language reference page is laggy on phone view, and can end up just crashing the browser.

The language reference is a self-contained 941KB html file with no javascript. It is neither laggy nor fast; it is just some html. I think it's a quite reasonable quantity of html to have on one page, and I think your experience is unusual with respect to performance of this page in most browsers, including on phones.

> I'd like to also bring to the attention of the team, that the language reference page is laggy on phone view, and can end up just crashing the browser. The language reference is a self-contained 941KB html file with no javascript. It is neither laggy nor fast; it is just some html. I think it's a quite reasonable quantity of html to have on one page, and I think your experience is unusual with respect to performance of this page in most browsers, including on phones.

Ah ok 😔 thanks

Ah ok 😔 thanks

Hmm, so the strict requirement for the language reference is to be fully HTML?

Hmm, so the strict requirement for the language reference is to be fully HTML?
Sign in to join this conversation.
No Branch/Tag specified
main
release-0.16.0
apraga/french
homersimpsons/fix/mobile-responsiveness
MarkLagodych/patch-1
Zirunis/patch-1
zmitchell/zmitchell/build-graph-docs
generalmimon/fix-unit-testing-examples
generalmimon/fix-code-snippet-in-0.15.1-relnotes
TheConnorJohnson/main
meeting-minutes
enkvadrat/update-curl-example
No results found.
Labels
Clear labels
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/ziglang.org#623
Reference in a new issue
ziglang/ziglang.org
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?