Skip to content

Commit

Permalink
Deployed b6df99d to 0.8 with MkDocs 1.5.3 and mike 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jimporter committed Nov 2, 2023
1 parent bfb79e6 commit 8def313
Show file tree
Hide file tree
Showing 62 changed files with 170 additions and 14,591 deletions.
2 changes: 1 addition & 1 deletion 0.8/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ <h1 id="404-page-not-found" style="text-align: center">404</h1>
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="/js/base.js" defer></script>
<script src="/js/version-select.js" defer></script>
<script src="/search/main.js" defer></script>
<script src="/js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
2 changes: 1 addition & 1 deletion 0.8/about/changes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ <h2 id="v010">v0.1.0<a class="headerlink" href="#v010" title="Permanent link">§
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
2 changes: 1 addition & 1 deletion 0.8/about/license/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ <h2 id="bsd-3-clause-license">BSD 3-clause license<a class="headerlink" href="#b
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
22 changes: 18 additions & 4 deletions 0.8/css/version-select.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
#version-selector {
float: left;
display: flex;
align-items: center;
margin: 0 10px;
padding: 0 10px;
}

#version-selector > select {
width: auto;
height: auto;
padding: 1px;
}

/* MkDocs v1.0 */
.navbar-header > #version-selector {
display: flex;
align-items: center;
}

/* MkDocs v1.1 */
.container > #version-selector {
flex-grow: 1;
}

@media (min-width: 992px) {
.container > #version-selector {
flex-grow: 0;
}
}
2 changes: 1 addition & 1 deletion 0.8/developer/backends/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ <h3 id="backend-version">backend.version()<a class="headerlink" href="#backend-v
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
2 changes: 1 addition & 1 deletion 0.8/developer/builtins/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ <h2 id="context-objects">Context objects<a class="headerlink" href="#context-obj
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
16 changes: 6 additions & 10 deletions 0.8/developer/contributing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,30 +174,26 @@ <h2 id="setting-up-a-development-environment">Setting up a development environme
environment for bfg9000 is to use <code>pip</code> to install an editable version of the
package. You'll probably also want all the testing dependencies, which you can
install with the <code>test</code> extra:</p>
<pre><code class="sh">$ pip install -e '.[test]'
<pre><code class="language-sh">$ pip install -e '.[test]'
</code></pre>

<h3 id="running-tests">Running tests<a class="headerlink" href="#running-tests" title="Permanent link">§</a></h3>
<p>bfg9000 has a suite of tests to ensure that everything works properly. (Well,
everything that has tests!) As you may expect, you can run these via:</p>
<pre><code class="sh">$ python setup.py test
<pre><code class="language-sh">$ python setup.py test
</code></pre>

<p>If you'd like to run a subset of tests, such as when trying to fix a bug in a
specific area of the code, you can limit the tests that get run. For instance,
to run only the tests in <code>test/integration/test_simple.py</code>, you can type:</p>
<pre><code class="sh">$ python setup.py test -s test.integration.test_simple
<pre><code class="language-sh">$ python setup.py test -s test.integration.test_simple
</code></pre>

<p>To generate a coverage report, simply replace <code>test</code> with <code>coverage</code>, and build
the report in the format you want, e.g.:</p>
<pre><code class="sh">$ python setup.py coverage &amp;&amp; coverage html
<pre><code class="language-sh">$ python setup.py coverage &amp;&amp; coverage html
</code></pre>

<h3 id="linting-code">Linting code<a class="headerlink" href="#linting-code" title="Permanent link">§</a></h3>
<p>bfg9000 uses <a href="https://flake8.readthedocs.org/en/latest/">flake8</a> for linting. You can check this with the <code>lint</code>
command like so:</p>
<pre><code class="sh">$ python setup.py lint
<pre><code class="language-sh">$ python setup.py lint
</code></pre></div>
</div>

Expand All @@ -211,8 +207,8 @@ <h3 id="linting-code">Linting code<a class="headerlink" href="#linting-code" tit
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
2 changes: 1 addition & 1 deletion 0.8/developer/tools/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ <h3 id="get_tool_runnerlang">get_tool_runner(<em>lang</em>)<a class="headerlink"
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
12 changes: 5 additions & 7 deletions 0.8/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,15 @@ <h4 id="stay-sane">Stay sane<a class="headerlink" href="#stay-sane" title="Perma
<hr />
<h2 id="a-brief-example">A brief example<a class="headerlink" href="#a-brief-example" title="Permanent link">§</a></h2>
<p>You can't get much simpler than the simplest <code>build.bfg</code> file:</p>
<pre><code class="python">executable('simple', files=['simple.cpp'])
<pre><code class="language-python">executable('simple', files=['simple.cpp'])
</code></pre>

<p>To build this executable, we need to create the actual build files and then
run them:</p>
<pre><code class="sh">$ cd /path/to/src/
<pre><code class="language-sh">$ cd /path/to/src/
$ 9k build/
$ cd build/
$ ninja
</code></pre>

<p>From there, you can run your newly-created executable: <code>./simple</code>. Hooray!</p>
<p>For further examples, please see the <a href="https://github.com/jimporter/bfg9000/tree/master/examples"><code>examples/</code></a> subdirectory.</p></div>
</div>
Expand All @@ -209,8 +207,8 @@ <h2 id="a-brief-example">A brief example<a class="headerlink" href="#a-brief-exa
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="js/base.js" defer></script>
<script src="js/version-select.js" defer></script>
<script src="search/main.js" defer></script>
<script src="js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down Expand Up @@ -280,6 +278,6 @@ <h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
</html>

<!--
MkDocs version : 1.4.3
Build Date UTC : 2023-07-06 18:02:29.507368+00:00
MkDocs version : 1.5.3
Build Date UTC : 2023-11-02 22:54:45.270590+00:00
-->
73 changes: 41 additions & 32 deletions 0.8/js/version-select.js
Original file line number Diff line number Diff line change
@@ -1,71 +1,80 @@
window.addEventListener("DOMContentLoaded", function() {
function normalizePath(path) {
var normalized = [];
function expandPath(path) {
// Get the base directory components.
var expanded = window.location.pathname.split("/");
expanded.pop();
var isSubdir = false;

path.split("/").forEach(function(bit, i) {
if (bit === "." || (bit === "" && i !== 0)) {
return;
if (bit === "" && i === 0) {
isSubdir = false;
expanded = [""];
} else if (bit === "." || bit === "") {
isSubdir = true;
} else if (bit === "..") {
if (normalized.length === 1 && normalized[0] === "") {
if (expanded.length === 1) {
// We must be trying to .. past the root!
throw new Error("invalid path");
} else if (normalized.length === 0 ||
normalized[normalized.length - 1] === "..") {
normalized.push("..");
} else {
normalized.pop();
isSubdir = true;
expanded.pop();
}
} else {
normalized.push(bit);
isSubdir = false;
expanded.push(bit);
}
});
return normalized.join("/");

if (isSubdir)
expanded.push("");
return expanded.join("/");
}

// `base_url` comes from the base.html template for this theme.
var REL_BASE_URL = base_url;
var ABS_BASE_URL = normalizePath(window.location.pathname + "/" +
REL_BASE_URL);
var CURRENT_VERSION = ABS_BASE_URL.split("/").pop();
var ABS_BASE_URL = expandPath(base_url);
var CURRENT_VERSION = ABS_BASE_URL.match(/\/([^\/]+)\/$/)[1];

function makeSelect(options, selected) {
function makeSelect(options) {
var select = document.createElement("select");
select.classList.add("form-control");

options.forEach(function(i) {
var option = new Option(i.text, i.value, undefined,
i.value === selected);
i.selected);
select.add(option);
});

return select;
}

var xhr = new XMLHttpRequest();
xhr.open("GET", REL_BASE_URL + "/../versions.json");
xhr.onload = function() {
var versions = JSON.parse(this.responseText);

fetch(ABS_BASE_URL + "../versions.json").then((response) => {
return response.json();
}).then((versions) => {
var realVersion = versions.find(function(i) {
return i.version === CURRENT_VERSION ||
i.aliases.includes(CURRENT_VERSION);
}).version;

var select = makeSelect(versions.map(function(i) {
return {text: i.title, value: i.version};
}), realVersion);
var select = makeSelect(versions.filter(function(i) {
return i.version === realVersion || !i.properties || !i.properties.hidden;
}).map(function(i) {
return {text: i.title, value: i.version,
selected: i.version === realVersion};
}));
select.addEventListener("change", function(event) {
window.location.href = REL_BASE_URL + "/../" + this.value;
window.location.href = ABS_BASE_URL + "../" + this.value + "/";
});

var container = document.createElement("div");
container.id = "version-selector";
container.appendChild(select);

var title = document.querySelector("div.navbar-header");
var height = window.getComputedStyle(title).getPropertyValue("height");
container.style.height = height;
var title = document.querySelector(".navbar-brand");
if (title.parentNode.classList.contains("navbar-header")) {
var height = window.getComputedStyle(title).getPropertyValue("height");
container.style.height = height;
}

title.appendChild(container);
};
xhr.send();
title.parentNode.insertBefore(container, title.nextSibling);
});
});
14 changes: 5 additions & 9 deletions 0.8/reference/builtins/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,8 @@ <h2 id="file-objects">File objects<a class="headerlink" href="#file-objects" tit
appropriate type. However, in some cases, you may wish to explicitly create a
file object. This can be useful, for instance, when running commands that take a
source file as an argument, e.g. in the following snippet:</p>
<pre><code class="python">command('script', cmd=[source_file('script.py')])
<pre><code class="language-python">command('script', cmd=[source_file('script.py')])
</code></pre>

<p>Using <a href="#source_file"><em>source_file</em></a> here allows you to specify that the file is
a source code file found in the <em>source directory</em>, rather than the build
directory. Further, since the file is a Python script, it can be executed as
Expand Down Expand Up @@ -492,13 +491,12 @@ <h3 id="object_files">object_files(<em>files</em>, *, ..., [<em>extra_deps</em>]
it using the filename of one of the source files listed in <em>files</em>. This makes
it easy to extract a single object file to use in other places, e.g. test code.
For example:</p>
<pre><code class="python">objs = object_files(['foo.cpp', 'bar.cpp'])
<pre><code class="language-python">objs = object_files(['foo.cpp', 'bar.cpp'])
release_exe = executable('release', objs)

foo_obj = objs['foo.cpp']
test_exe = executable('test', ['test.cpp', foo_obj])
</code></pre>

<h3 id="precompiled_header">precompiled_header([<em>name</em>], [<em>file</em>, *, ..., [<em>extra_deps</em>], [<em>description</em>]])<a class="headerlink" href="#precompiled_header" title="Permanent link">§</a></h3>
<p class="subtitle">Availability: <code>build.bfg</code></p>
<p>Create a build step that generates a precompiled header, which can be used to
Expand Down Expand Up @@ -724,14 +722,13 @@ <h3 id="placeholder"><em>placeholder</em><a class="headerlink" href="#placeholde
<a href="#command"><em>command</em></a>, this will create a reference to the inputs or outputs of
the step. Placeholders can be indexed or sliced just like ordinary Python lists,
and can also be combined with strings to add prefixes and suffixes:</p>
<pre><code class="python">script = source_file('script.py')
<pre><code class="language-python">script = source_file('script.py')

# Roughly equivalent to `python script.py -ifoo.txt -sbar.txt -squux.txt`
command('foo', cmd=[
script, '-i' + command.input[0], '-s' + command.input[1:]
], files=['foo.txt', 'bar.txt', 'quux.txt'])
</code></pre>

<h2 id="semantic-options">Semantic options<a class="headerlink" href="#semantic-options" title="Permanent link">§</a></h2>
<p>Semantic options are a collection of objects that allow a build to define
options in a tool-agnostic way. These options will automatically be converted to
Expand All @@ -744,9 +741,8 @@ <h3 id="opts-define">opts.define(<em>name</em>, [<em>value</em>])<a class="heade
<p>Create a preprocessor macro named <em>name</em> and with an optional value <em>value</em>.
Note that if you'd like the value to be a string literal, you need to escape the
string like so:</p>
<pre><code class="python">opts.define('MY_MACRO', '&quot;This is a string, isn\'t it?&quot;')
<pre><code class="language-python">opts.define('MY_MACRO', '&quot;This is a string, isn\'t it?&quot;')
</code></pre>

<h3 id="opts-entry_point">opts.entry_point(<em>value</em>)<a class="headerlink" href="#opts-entry_point" title="Permanent link">§</a></h3>
<p>Set the symbol to use for beginning program execution. This is equivalent to
passing <code>entry_point=value</code> to <a href="#executable"><em>executable</em></a> or
Expand Down Expand Up @@ -1409,8 +1405,8 @@ <h3 id="versionerror">VersionError<a class="headerlink" href="#versionerror" tit
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
2 changes: 1 addition & 1 deletion 0.8/reference/command-line/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ <h2 id="9k-shorthand"><code>9k</code> shorthand<a class="headerlink" href="#9k-s
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
2 changes: 1 addition & 1 deletion 0.8/reference/environment-vars/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ <h4 id="windowssdkversion"><code>WINDOWSSDKVERSION</code><a class="headerlink" h
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
2 changes: 1 addition & 1 deletion 0.8/reference/languages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ <h3 id="ruby">Ruby<a class="headerlink" href="#ruby" title="Permanent link">§</
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../js/version-select.js" defer></script>
<script src="../../search/main.js" defer></script>
<script src="../../js/version-select.js" defer></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
<div class="modal-dialog">
Expand Down
Binary file modified 0.8/sitemap.xml.gz
Binary file not shown.
Loading

0 comments on commit 8def313

Please sign in to comment.