Offline Doc/Handbook accompany with c3c distribution package
Is it possible to provide c3c manual/doc/handbook something like https://c3-lang.org/ provides in the distributionn package?Sometime it is not so convenient or even it fails to connect to the page.It does help a lot if there is an offline manual available.
Well, theoretically yes, but unless that is generated from the site itself it would mean there are more than 1 place to update things, and that would mean more risk of things getting out of sync. Maybe someone could generate a PDF automatically from the markdown pages?
The docs are still a work in progress; this is something I am slowly working on behind the scenes. Currently your best shot is to
git clonethe https://github.com/c3lang/c3-web github repository, then- install nodejs, then
- run
corepack enable pnpmto enable pnpm (a package manager that is faster than npm), then pnpm ito install dependencies from within the c3-web directory, and finallypnpm run devto serve the site on localhost.git pullperiodically to update the docs.
There is also a way to generate a single html page or PDF from the markdown pages like this (outdated). We can rebuild these offline docs automatically with CI scripts or web frameworks, but right now I don't think the docs are complete enough to justify distributing a manual. I think this issue should be moved to the c3-web repo. Here is a similar issue: #91
Another way to properly save any webpage for offline use is by downloading this browser extension called SingleFile. If you want to automatically save all webpages you visit and be able to search through their text, use ArchiveBox.
Oh also, for some reason the Astro package isn't included in the package.json file, so you have to pnpm i astro as well. #156. Update: wow the links are broken for some reason. Working on a fix.
Great idea! This could maybe be added to the v1.0 milestone?
SingleFile helps.Thank you!
The docs are still a work in progress; this is something I am slowly working on behind the scenes. Currently your best shot is to
1. `git clone` the https://github.com/c3lang/c3-web github repository, then 2. [install nodejs](https://nodejs.org/en/download), then 3. run `corepack enable pnpm` to enable pnpm (a package manager that is faster than npm), then 4. `pnpm i` to install dependencies from within the c3-web directory, and finally 5. `pnpm run dev` to serve the site on localhost. 6. `git pull` periodically to update the docs.There is also a way to generate a single html page or PDF from the markdown pages like this (outdated). We can rebuild these offline docs automatically with CI scripts or web frameworks, but right now I don't think the docs are complete enough to justify distributing a manual. I think this issue should be moved to the c3-web repo. Here is a similar issue: #91
Another way to properly save any webpage for offline use is by downloading this browser extension called SingleFile. If you want to automatically save all webpages you visit and be able to search through their text, use ArchiveBox.
...
Oh also, for some reason the Astro package isn't included in the package.json file, so you have to
pnpm i astroas well. #156. Update: wow the links are broken for some reason. Working on a fix.
I've tried all of these, plus several other ways of trying to install NPM and/or Astro multiple times and it never seems to make a real difference. I've also purged it a few times and with still no apparent significant effect. I can't get any form of the repo to build so far (except the main landing page), regardless of online vs offline.
I think perhaps you and/or some other contributors have a bunch of dependencies installed on your system(s) that you are depending on but which the current repo and/or instructions do not account for. Perhaps installing VirtualBox and creating one or more fresh installs of Linux in that virtual environment would help discern what those are, if any.
There is always great danger in not testing from fresh OS installs, because (especially on Linux) dependencies accumulate without one's awareness and what seems from the developer of a package to work seamlessly often only actually works because of the presence of many other dependencies that were on that specific system just by coincidence.
On the other hand, I am not a web dev (my own site only uses plain HTML and CSS by design, precisely because of how extraordinarily brittle the rest of the web "tech stack" is, though I previously had a simple WordPress site) so I could just be unaware of a myriad of unwritten assumptions of what working with NPM and such is supposed to be like. I don't really want to learn a large part of the web stack just to fix a bunch of mostly small documentation problems though.
Anyway, thanks for your time and efforts of course, in any case. I'll keep trying to see if I can find any way to build the docs, though if it takes too much longer I may start waiting for people's thoughts again. I'm hardly making any traction so far.
Unexpectedly, I've actually figured out a workaround that is effective.
See my comment on the other issue thread for more info. 😎
I did not find bitwise operators in the language documentation. I think there should first be a language reference, however rough it may be.