Giter Site home page Giter Site logo

mmdoc's Introduction

mmdoc

Minimal Markdown Documentation

Please read the documentation (generated with mmdoc).

mmdoc's People

Contributors

ryantm avatar dependabot[bot] avatar mic92 avatar jtojnar avatar henrik-ch avatar

Stargazers

Rusty avatar Dwayne Crooks avatar Tomas Zaluckij avatar  avatar Federico Damián Schonborn avatar Hugo Sena Ribeiro avatar Doron Behar avatar Jorge Gomez avatar  avatar  avatar Bocke avatar Jake Logemann avatar Jeff Carpenter avatar Zhaofeng Li avatar Bobby Rong avatar Yevhen Shymotiuk avatar  avatar Kevin Alexander Scott Jellis avatar timd avatar Rosario Pulella avatar Valentin Gagarin avatar Sandro avatar Zhao Xiaohong avatar Paul avatar Justus K avatar  avatar Daniel Fullmer avatar Daniel Kahlenberg avatar  avatar Bryan A. S. avatar

Watchers

 avatar Samuel Dionne-Riel avatar Tomas Zaluckij avatar  avatar

mmdoc's Issues

Missing colours in admonitions without JavaScript

Apparently, the light-theme and dark-theme classes are set in JavaScript but the CSS does not have colour variables set without theme being chosen. We should probably define the default colours for just :root.

Problem with nix fmt

Thank you for the update on the contributing page.

One thing that I tried out afterwards didn't work out for me:
nix fmt

when running the command I get the result:

$ nix fmt
Formatting C code...
Formatting Nix code...
/nix/store/54cjzi4jnky4hcikh2nrlxb9anz3ba7g-fmt/bin/fmt: 4: alejandra: not found

when I navigate into the nix store to inspect that file I get:

$ cat /nix/store/54cjzi4jnky4hcikh2nrlxb9anz3ba7g-fmt/bin/fmt
echo "Formatting C code..."
find src -iname *.h -o -iname *.c | xargs /nix/store/k25gw7i9z49clsn08s8yk5xjsvh39pf5-clang-tools-14.0.6/bin/clang-format -i
echo "Formatting Nix code..."
alejandra -q .

so I think the alejandra utility is missing for some reason, but I am not sure how to modify the flake to get it included?

I looked at the flake (apologies, I am very new to flakes in particular and also nix in general) and found this line:
https://github.com/ryantm/mmdoc/blob/main/flake.nix#L18
but I am not sure what that means and how it relates to my issue.

Request for Comment: Do we need man, epub, single page?

In the name of simplifying this tool, I'm thinking about removing support for single page, epub, and man pages, and focusing solely on the multipage output. Anyone have some strong objection to this? I'd leave a branch that has those around, so we could refer to it if we wanted to add them back later.

Notes:

  • epub only barely works and I bet it will take a lot of work to get working right, it also adds dependencies like libzip
  • Man pages barely make sense as they are currently implemented. The main problem is how to name them. I guess it could make sense to generate a single man page like the single page output.
  • Single page is probably the easiest to maintain but, still nicer to just focus on one output.

Issue and trying to understand np-build

I am trying to familiarize myself with flakes & nix by looking at your mmdoc project.

I am trying out the following:

$ nix develop
(nix:mmdoc-env) bash-5.2$ np-build
error: flake 'git+file:///home/i97henka/github/hkf-mmdoc' does not provide attribute 'packages.x86_64-linux.nixpkgs-manual', 'legacyPackages.x86_64-linux.nixpkgs-manual' or 'nixpkgs-manual'
(nix:mmdoc-env) bash-5.2$

and the result I expected is that the nixpkgs manual would build and be symlinked in the results folder.

I found this part of the code, which seems to define the np-build script.
https://github.com/ryantm/mmdoc/blob/main/pkgs/devShell.nix#L39

but I am not quite sure how it is supposed to work.

Overlapping text in the generated manual page for stdenv

I'm not exactly sure what causes it, but on this page https://ryantm.github.io/nixpkgs/stdenv/stdenv/, the bottom of the page spilled out of the <div class="body"><section id="main"><main>... block and is instead directly in the <body> which makes it into an overlapping mess, with the last part of the page in the background and unscrollable.

Screenshot 2022-10-29 at 19 50 51

Looking at the generated html code, it looks like there was a spurious </div> generated, which triggers the behaviour (at least in google chrome):

...
<p>Use <code>--prefix</code> to explicitly set dependencies in <code>PATH</code>.</p>
<p>
<code>--prefix</code> essentially hard-codes dependencies into the wrapper.
They cannot be overridden without rebuilding the package.
</p>
</div>
</div>
<p>If dependencies should be resolved at runtime, use <code>--suffix</code> to append fallback values to <code>PATH</code>.</p>
<p>There’s many more kinds of arguments, they are documented in <code>nixpkgs/pkgs/build-support/setup-hooks/make-wrapper.sh</code> for the <code>makeWrapper</code> implementation and in <code>nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh</code> for the <code>makeBinaryWrapper</code> implementation.</p>
...

The actual </main> and </section> tags are at the correct place later, but those are ignored by the browser, since it considers them closed already because of the </div> tags.

The original markdown for that section looks like this, so I don't know if it's because of the length of the file or because it misinterpreted the :::{note} block or what triggered the bug.

Use `--prefix` to explicitly set dependencies in `PATH`.

:::{note}
`--prefix` essentially hard-codes dependencies into the wrapper.
They cannot be overridden without rebuilding the package.
:::

If dependencies should be resolved at runtime, use `--suffix` to append fallback values to `PATH`.

Problem building the docs

I tried following the instructions on: https://ryantm.github.io/mmdoc/contributing/#contributing

the nix build command worked as far as I can see. The shell commands to build and continuously build didn't work - details below.

❯ pwd
/home/i97henka/github/ryantm-mmdoc
❯ ls
LICENSE README.md contrib doc flake.lock flake.nix meson.build pkgs result src test
❯ nix build
❯ nix shell -c doc-build
error: unable to execute 'doc-build': No such file or directory
❯ nix shell -c doc-watch
error: unable to execute 'doc-watch': No such file or directory

I haven't got much experience with nix or nix flakes, but I believe my machine is working as it should in terms of nix in general.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.