Skip to content

Commit cd7023f

Browse files
authored
Merge pull request #1 from A-Baji/mkdocs
Mkdocs
2 parents c61293a + 348aeea commit cd7023f

File tree

13 files changed

+241
-31
lines changed

13 files changed

+241
-31
lines changed

.github/workflows/development.yml

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,15 @@
1-
# This is a basic workflow to help you get started with Actions
2-
3-
name: CI
4-
5-
# Controls when the workflow will run
1+
name: Development
62
on:
7-
# Triggers the workflow on push or pull request events but only for the "main" branch
83
push:
9-
branches: [ "main" ]
10-
pull_request:
11-
branches: [ "main" ]
12-
13-
# Allows you to run this workflow manually from the Actions tab
14-
workflow_dispatch:
15-
16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
4+
branches:
5+
- master
176
jobs:
18-
# This workflow contains a single job called "build"
19-
build:
20-
# The type of runner that the job will run on
7+
deploy:
218
runs-on: ubuntu-latest
22-
23-
# Steps represent a sequence of tasks that will be executed as part of the job
249
steps:
25-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26-
- uses: actions/checkout@v3
27-
28-
# Runs a single command using the runners shell
29-
- name: Run a one-line script
30-
run: echo Hello, world!
31-
32-
# Runs a set of commands using the runners shell
33-
- name: Run a multi-line script
34-
run: |
35-
echo Add other actions to build,
36-
echo test, and deploy your project.
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.x
14+
- run: pip install mkdocs-material
15+
- run: mkdocs gh-deploy --force

.gitmodules

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[submodule "docs/sub_docs/element-array-ephys"]
2+
path = docs/sub_docs/element-array-ephys
3+
url = https://github.com/A-Baji/element-array-ephys.git
4+
branch = gh-pages
5+
[submodule "docs/element-array-ephys"]
6+
path = docs/element-array-ephys
7+
url = https://github.com/A-Baji/element-array-ephys.git
8+
branch = gh-pages

docker-compose-mkdocs-serve.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# docker-compose -f ./docker-compose-mkdocs-serve.yaml up --build
2+
version: "2.4"
3+
services:
4+
docs:
5+
build:
6+
context: .
7+
dockerfile: docs.dockerfile
8+
environment:
9+
- THEME_DIR=material
10+
volumes:
11+
- .:/main
12+
ports:
13+
- 80:80
14+
command:
15+
- bash
16+
- -c
17+
- |
18+
pwd
19+
mkdocs --version
20+
mkdocs serve -a 0.0.0.0:80
21+
# tail -f /dev/null
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# HOST_UID="$(id -u)" HOST_GID="$(id -g)" docker-compose -f ./docker-compose-multirepo-build.yaml up --build
2+
version: "2.4"
3+
services:
4+
docs:
5+
build:
6+
context: .
7+
dockerfile: docs.build.dockerfile
8+
volumes:
9+
- .:/main
10+
user: '${HOST_UID}:${HOST_GID}'
11+
command:
12+
- bash
13+
- -c
14+
- |
15+
pwd
16+
git init
17+
git submodule init
18+
git submodule update
19+
git submodule foreach git pull origin gh-pages
20+
# tail -f /dev/null

docs.build.dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM python:latest
2+
3+
WORKDIR /main
4+
COPY . /main
5+
RUN pip install mkdocs mkdocs-material

docs.dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM python:slim
2+
3+
WORKDIR /main
4+
COPY . /main
5+
RUN pip install mkdocs mkdocs-material

docs/assets/elements-logo.png

47.2 KB
Loading

docs/element-array-ephys

Submodule element-array-ephys added at 97b4620

docs/index.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Welcome to Docs Hub
2+
3+
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
4+
5+
## Projects
6+
7+
<script>
8+
function includeHTML() {
9+
var z, i, elmnt, file, xhttp;
10+
/*loop through a collection of all HTML elements:*/
11+
z = document.getElementsByTagName("*");
12+
for (i = 0; i < z.length; i++) {
13+
elmnt = z[i];
14+
/*search for elements with a certain atrribute:*/
15+
file = elmnt.getAttribute("w3-include-html");
16+
if (file) {
17+
/*make an HTTP request using the attribute value as the file name:*/
18+
xhttp = new XMLHttpRequest();
19+
xhttp.onreadystatechange = function() {
20+
if (this.readyState == 4) {
21+
if (this.status == 200) {elmnt.innerHTML = this.responseText;}
22+
if (this.status == 404) {elmnt.innerHTML = "Page not found.";}
23+
/*remove the attribute, and call this function once more:*/
24+
elmnt.removeAttribute("w3-include-html");
25+
includeHTML();
26+
}
27+
}
28+
xhttp.open("GET", file, true);
29+
xhttp.send();
30+
/*exit the function:*/
31+
return;
32+
}
33+
}
34+
};
35+
</script>
36+
37+
<body>
38+
<div w3-include-html="sub_docs.html"></div>
39+
<script>
40+
includeHTML();
41+
</script>
42+
</body>
43+
44+
## Commands
45+
46+
* `mkdocs new [dir-name]` - Create a new project.
47+
* `mkdocs serve` - Start the live-reloading docs server.
48+
* `mkdocs build` - Build the documentation site.
49+
* `mkdocs -h` - Print help message and exit.
50+
51+
## Project layout
52+
53+
mkdocs.yml # The configuration file.
54+
docs/
55+
index.md # The documentation homepage.
56+
... # Other markdown pages, images and other files.

docs/stylesheets/extra.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[data-md-color-scheme="datajoint"] {
2+
3+
--dj-yellow: #fcb954;
4+
5+
--md-primary-fg-color: var(--dj-yellow);
6+
--md-primary-bg-color: #000000;
7+
--md-primary-fg-color--dark: var(--dj-yellow);
8+
9+
--md-accent-fg-color: var(--dj-yellow);
10+
11+
--md-code-bg-color: #e4f3f6;
12+
13+
--md-footer-fg-color: var(--dj-yellow);
14+
}
15+
16+
[data-md-color-scheme="slate"] {
17+
18+
--dj-yellow: #fcb954;
19+
20+
--md-typeset-color: #e4f3f6;
21+
--md-typeset-a-color: #17b2ff;
22+
23+
--md-default-fg-color: #e4f3f6;
24+
--md-default-fg-color--light: var(--dj-yellow);
25+
26+
--md-primary-fg-color: var(--dj-yellow);
27+
--md-primary-bg-color: #000000;
28+
--md-primary-fg-color--dark: var(--dj-yellow);
29+
30+
--md-accent-fg-color: var(--dj-yellow);
31+
32+
--md-code-fg-color: #76c9e9;
33+
--md-code-hl-comment-color: #ffd28d;
34+
35+
--md-footer-fg-color: var(--dj-yellow);
36+
}

0 commit comments

Comments
 (0)