-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ovainola
committed
Jun 26, 2015
1 parent
8496477
commit 7cbbda1
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using Docile, Lexicon, JuliaFEM | ||
|
||
const api_directory = "api" | ||
const modules = [JuliaFEM, JuliaFEM.elasticity_solver] | ||
|
||
cd(dirname(@__FILE__)) do | ||
# Generate and save the contents of docstrings as markdown files. | ||
index = Index() | ||
for mod in modules | ||
Lexicon.update!(index, save(joinpath(api_directory, "$(mod).md"), mod)) | ||
end | ||
save(joinpath(api_directory, "index.md"), index; md_subheader = :category) | ||
|
||
# Add a reminder not to edit the generated files. | ||
open(joinpath(api_directory, "README_new.md"), "w") do f | ||
print(f, """ | ||
Files in this directory are generated using the `build.jl` script. Make | ||
all changes to the originating docstrings/files rather than these ones. | ||
""") | ||
end | ||
|
||
info("Adding all documentation changes in $(api_directory) to this commit.") | ||
success(`git add $(api_directory)`) || exit(1) | ||
|
||
end | ||
|
||
|
||
cd(dirname(dirname(@__FILE__))) do | ||
yaml = """ | ||
# This is automatically generated by docs/build.jl. Edit that file if you | ||
# wish to make any permenant changes. | ||
site_name: JuliaFEM.jl | ||
site_description: JuliaFEM.jl, open-source software for reliable, scalable, distributed Finite Element Method. | ||
repo_name: GitHub | ||
docs_dir: 'docs' | ||
site_dir: 'site' | ||
repo_url: https://github.com/JuliaFEM/JuliaFEM.jl | ||
pages: | ||
- Home: 'README.md' | ||
- Overview: 'api/index.md' | ||
- API Docs: | ||
- JuliaFEM: 'api/JuliaFEM.md' | ||
- JuliaFEM.elasticity_solver: 'api/JuliaFEM.elasticity_solver.md' | ||
""" | ||
|
||
# TODO: add the solutions if I figure out how to get them to render properly | ||
|
||
open("mkdocs.yml", "w") do f | ||
write(f, yaml) | ||
end | ||
end |