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

Nix'ify docs website, and check for broken links in CI #398

Merged
merged 11 commits into from
Mar 27, 2022
Merged

Conversation

srid
Copy link
Member

@srid srid commented Mar 24, 2022

Adds nix run .#docs to run a live web view of docs locally. As well as nix run .#website to build the static website. This is the same as what we do in https://github.com/Plutonomicon/plutonomicon - but using a newer version of Emanote containing support for the full range of relative links.

The latter command also checks for broken links (the CI for this PR succeeds because those broken links have been fixed here).

Eventually, we can include Haddock generated HTML in the generated site of nix run .#website, before deploying it statically to GH pages using #393.

@srid srid requested a review from TotallyNotChase March 24, 2022 20:49
@srid srid changed the base branch from master to staging March 24, 2022 20:49
@srid srid marked this pull request as draft March 24, 2022 20:50
@srid
Copy link
Member Author

srid commented Mar 24, 2022

As expected CI fails due to broken links:

image

@srid srid changed the title Nix'ify running / creating docs website Nix'ify docs website, and check for broken links Mar 24, 2022
@srid srid marked this pull request as ready for review March 24, 2022 21:42
@srid srid changed the title Nix'ify docs website, and check for broken links Nix'ify docs website, and check for broken links in CI Mar 24, 2022
@srid srid added the documentation Improvements or additions to documentation label Mar 24, 2022
Copy link
Collaborator

@TotallyNotChase TotallyNotChase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs look good, I think you fixed all the remaining broken links too?

Also, I was curious, can we have a search feature somehow?

@TotallyNotChase
Copy link
Collaborator

actually could you also fix the hyperlink here please - I accidentally made it \[[3](./../Concepts.md#references)], should actually point to Introduction.md#references

@srid
Copy link
Member Author

srid commented Mar 25, 2022

The docs look good, I think you fixed all the remaining broken links too?

Yup.

Also, I was curious, can we have a search feature somehow?

Not right now, but eventually1 I'd like to integrate something like https://stork-search.net/ into Emanote.

Footnotes

  1. However, for now, it may be possible to create the Stork index and inject the JS all in Nix as part of nix build .#website to get it working on static site alone (if not the live server).

@srid srid requested a review from TotallyNotChase March 25, 2022 16:26
@TotallyNotChase
Copy link
Collaborator

One small thing, what's up with the github issue hyperlinks getting skewed?

image

Check the troubleshooting section for example. It seems to generate two links from it.

@srid
Copy link
Member Author

srid commented Mar 25, 2022

That's due to inline tag parser getting in the way: srid/emanote#167

A workaround would be to escape the # with a \ (just did this in a commit), but latter I'll try to think of a proper solution here.

Relevant issue: [\#275](https://github.com/Plutonomicon/plutarch/issues/275)

@srid srid mentioned this pull request Mar 25, 2022
3 tasks
Copy link
Collaborator

@TotallyNotChase TotallyNotChase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautiful

rec {
type = "app";
# '' is required for escaping ${} in nix
script = (nixpkgsFor system).writers.writeBash "emanoteLiveReload.sh" ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this different from writeShellScriptBin?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a copy-paste from plutonomicon, but now that you mention it I realize we should instead be using checkedShellScript from the flake.

@L-as L-as merged commit 14034fb into staging Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants