Skip to content

Commit

Permalink
Make Documentation Updates Easier and More Accurate (#1573)
Browse files Browse the repository at this point in the history
I made a documentation change and noticed that the result when browsed
locally did not quite match what is seen when browsing from the web.
After some research, I found mkdocs/mkdocs#2028
That described my situation well and suggested adding an extra
javascript script to the configuration. This worked exactly as desired
on my local machine. This accounts for the presence of extrajs.js
and mkdocs.yml in this request.

In addition to the display problem, "mkdocs build" generates the
documentation into a directory which is not ignored by git. I added
that directory to .gitignore as part of this request.

Finally, since I don't know how exactly the documentation makes it
to production, I made an insignificant change to one doc file as
a sanity check.
  • Loading branch information
oleibman authored Feb 15, 2021
1 parent ef3f8f3 commit 10c9c4c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
*.project
/.settings
/.idea

## mkdocs output
/site
5 changes: 5 additions & 0 deletions docs/extra/extrajs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll("table").forEach(function(table) {
table.classList.add("docutils");
});
});
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ php vendor/phpoffice/phpspreadsheet/samples/Basic/01_Simple.php

## Learn by documentation

For more in-depth documentation, you may read about an [overview of the
For more documentation in depth, you may read about an [overview of the
architecture](./topics/architecture.md),
[creating a spreadsheet](./topics/creating-spreadsheet.md),
[worksheets](./topics/worksheets.md),
Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ edit_uri: edit/master/docs/
theme: readthedocs
extra_css:
- extra/extra.css
extra_javascript:
- extra/extrajs.js

0 comments on commit 10c9c4c

Please sign in to comment.