Skip to content

Commit 1d7082d

Browse files
committed
Use absolute URLs to svg images instead of bundling them
Generated docs are not "portable" if we try to bundle the svg illustrations. Simply link directly to the versions I've uploaded on github.
1 parent 295208a commit 1d7082d

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

docgen/mkdocs.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def dest_dir():
5050

5151
def doc_home():
5252
return P.dirname(sys.argv[0])
53-
def image_dir():
5453

54+
def image_dir():
5555
return P.join(doc_home(), "images")
5656

5757
def mkdocs():
@@ -64,10 +64,8 @@ def mkdocs():
6464
% (docdir, version(crate)))
6565
dest = dest_dir()
6666
target_doc = P.join(target_dir(), "doc")
67-
images_dir = image_dir()
6867
run_shell("rm -rvf ./%s" % dest)
6968
run_shell("cp -r %s %s" % (target_doc, dest))
70-
run_shell("cp %s/*.svg %s/ndarray/" % (images_dir, dest))
7169
run_shell("cat %s/custom.css >> %s/main.css" % (doc_home(), dest))
7270
# remove empty files
7371
run_shell("find %s -size 0 -delete" % (dest, ))

src/impl_methods.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
519519
///
520520
/// **Panics** if `axis` is out of bounds.
521521
///
522-
/// <img src="axis_iter.svg" height="250px">
522+
/// <img src="https://bluss.github.io/ndarray/images/axis_iter.svg" height="250px">
523523
pub fn axis_iter(&self, axis: Axis) -> AxisIter<A, D::Smaller>
524524
where D: RemoveAxis,
525525
{

src/impl_views.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl<'a, A, D> ArrayBase<ViewRepr<&'a A>, D>
8181
/// Below, an illustration of `.split_at(Axis(2), 2)` on
8282
/// an array with shape 3 × 5 × 5.
8383
///
84-
/// <img src="split_at.svg" width="300px" height="271px">
84+
/// <img src="https://bluss.github.io/ndarray/images/split_at.svg" width="300px" height="271px">
8585
pub fn split_at(self, axis: Axis, index: Ix)
8686
-> (Self, Self)
8787
{

0 commit comments

Comments
 (0)