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

Display README in the Documentation #122

Merged
merged 11 commits into from
Apr 20, 2024

Conversation

navidcy
Copy link
Contributor

@navidcy navidcy commented Apr 10, 2024

This PR actually displays the README file in the main page of the Documentation instead of pointing users to go read the README file. It's not totally perfect because, as DocstringExtensions Docs mention:

The README.md file is interpreted as "Julia flavored Markdown", which has some differences compared to GitHub flavored markdown, and, for example, [][] link shortcuts are not supported.

We can probably modify the README so that it shows up nicely both in the Github Page and in the Docs.
Before the docs are built, make.jl copies certain image files from examples/ directory to docs/src/examples so that when README.md points to them they are show in the Docs version.

The PR also adds a functionality that Documenter pushes a preview of how the docs will look after the PR + a Github action that deletes that preview when the PR is merged. Unfortunately, this functionality only works from PRs that come from the same repository -- not from a fork of the repo (like this PR is). Therefore, you won't see a preview with this PR...

@navidcy
Copy link
Contributor Author

navidcy commented Apr 10, 2024

You can see a preview of the docs locally by calling:

julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'; JULIA_DEBUG=Documenter julia --project=docs docs/make.jl; open docs/build/index.html

from the repo's main directory (not from /docs).

@navidcy
Copy link
Contributor Author

navidcy commented Apr 10, 2024

OK, now the Docs show all images that are shown in the actual README.md!

@weymouth
Copy link
Collaborator

weymouth commented Apr 14, 2024 via email

@weymouth weymouth merged commit 9f0fc97 into WaterLily-jl:master Apr 20, 2024
11 checks passed
@navidcy navidcy deleted the ncc/add-readme-in-docs branch April 20, 2024 14:35
weymouth referenced this pull request Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants