|
38 | 38 |
|
39 | 39 | [~, n, s] = fileparts(styleFile); |
40 | 40 | styleName = strcat(n, s); |
41 | | - |
42 | | -head = ["<!DOCTYPE html>", ... |
43 | | -'<head lang="en">',... |
44 | | -'<meta charset="UTF-8">', ... |
45 | | -'<meta name="color-scheme" content="dark light">', ... |
46 | | -'<meta name="viewport" content="width=device-width, initial-scale=1">', ... |
47 | | -sprintf('<meta name="generator" content="Matlab %s">', matlabRelease().Release), ... |
48 | | -sprintf('<link rel="stylesheet" href="%s">', styleName), ... |
49 | | -"<title>" + pkg_name + " API</title>", ... |
50 | | -"</head>"]; |
51 | | - |
52 | | -body = [ |
53 | | -"<body>", ... |
54 | | -sprintf('<h1>%s API</h1>', pkg_name), ... |
55 | | -sprintf('<p>%s</p>', tagline), ... |
56 | | -sprintf('<p>%s</p>', git_txt)]; |
57 | | - |
58 | | -body = [body, ... |
59 | | -'<p id="userAgent"></p>', ... |
60 | | -'<script>document.getElementById("userAgent").textContent = navigator.userAgent;</script>', ... |
61 | | -"<p>Project URL: <a href=" + project_url + ">" + project_url + "</a></p>", ... |
62 | | -"<h2>API Reference</h2>"]; |
| 41 | +[head, body] = index_html(styleName, pkg_name, tagline, git_txt, project_url); |
63 | 42 |
|
64 | 43 | fid = fopen(readme, 'w'); |
65 | 44 | fprintf(fid, join([head, body], newline)); |
|
0 commit comments