Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 10 additions & 31 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
name: Development
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
branches:
- main
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
deploy:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "docs/sub_docs/element-array-ephys"]
path = docs/sub_docs/element-array-ephys
url = https://github.com/A-Baji/element-array-ephys.git
branch = gh-pages
[submodule "docs/element-array-ephys"]
path = docs/element-array-ephys
url = https://github.com/A-Baji/element-array-ephys.git
branch = gh-pages
21 changes: 21 additions & 0 deletions docker-compose-mkdocs-serve.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# docker-compose -f ./docker-compose-mkdocs-serve.yaml up --build
version: "2.4"
services:
docs:
build:
context: .
dockerfile: docs.dockerfile
environment:
- THEME_DIR=material
volumes:
- .:/main
ports:
- 80:80
command:
- bash
- -c
- |
pwd
mkdocs --version
mkdocs serve -a 0.0.0.0:80
# tail -f /dev/null
20 changes: 20 additions & 0 deletions docker-compose-multirepo-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# HOST_UID="$(id -u)" HOST_GID="$(id -g)" docker-compose -f ./docker-compose-multirepo-build.yaml up --build
version: "2.4"
services:
docs:
build:
context: .
dockerfile: docs.build.dockerfile
volumes:
- .:/main
user: '${HOST_UID}:${HOST_GID}'
command:
- bash
- -c
- |
pwd
git init
git submodule init
git submodule update
git submodule foreach git pull origin gh-pages
# tail -f /dev/null
5 changes: 5 additions & 0 deletions docs.build.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM python:latest

WORKDIR /main
COPY . /main
RUN pip install mkdocs mkdocs-material
5 changes: 5 additions & 0 deletions docs.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM python:slim

WORKDIR /main
COPY . /main
RUN pip install mkdocs mkdocs-material
Binary file added docs/assets/elements-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/element-array-ephys
Submodule element-array-ephys added at 97b462
56 changes: 56 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Welcome to Docs Hub

For full documentation visit [mkdocs.org](https://www.mkdocs.org).

## Projects

<script>
function includeHTML() {
var z, i, elmnt, file, xhttp;
/*loop through a collection of all HTML elements:*/
z = document.getElementsByTagName("*");
for (i = 0; i < z.length; i++) {
elmnt = z[i];
/*search for elements with a certain atrribute:*/
file = elmnt.getAttribute("w3-include-html");
if (file) {
/*make an HTTP request using the attribute value as the file name:*/
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {elmnt.innerHTML = this.responseText;}
if (this.status == 404) {elmnt.innerHTML = "Page not found.";}
/*remove the attribute, and call this function once more:*/
elmnt.removeAttribute("w3-include-html");
includeHTML();
}
}
xhttp.open("GET", file, true);
xhttp.send();
/*exit the function:*/
return;
}
}
};
</script>

<body>
<div w3-include-html="sub_docs.html"></div>
<script>
includeHTML();
</script>
</body>

## Commands

* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.

## Project layout

mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
36 changes: 36 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[data-md-color-scheme="datajoint"] {

--dj-yellow: #fcb954;

--md-primary-fg-color: var(--dj-yellow);
--md-primary-bg-color: #000000;
--md-primary-fg-color--dark: var(--dj-yellow);

--md-accent-fg-color: var(--dj-yellow);

--md-code-bg-color: #e4f3f6;

--md-footer-fg-color: var(--dj-yellow);
}

[data-md-color-scheme="slate"] {

--dj-yellow: #fcb954;

--md-typeset-color: #e4f3f6;
--md-typeset-a-color: #17b2ff;

--md-default-fg-color: #e4f3f6;
--md-default-fg-color--light: var(--dj-yellow);

--md-primary-fg-color: var(--dj-yellow);
--md-primary-bg-color: #000000;
--md-primary-fg-color--dark: var(--dj-yellow);

--md-accent-fg-color: var(--dj-yellow);

--md-code-fg-color: #76c9e9;
--md-code-hl-comment-color: #ffd28d;

--md-footer-fg-color: var(--dj-yellow);
}
44 changes: 44 additions & 0 deletions docs/stylesheets/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
section {
max-width: 44.5rem;
padding: 0;
color: #3c4043;
line-height: 1.25rem;
}

section ul {
margin: 0;
outline: 0;
padding: 0;
display: inline-block;
max-width: 44.5rem;
}

section li {
min-height: 3.125rem;
vertical-align: top;
display: inline-block;
}

section li > a {
max-height: 7rem;
padding: 0.5rem;
margin: 0.5rem;
border: .0625rem solid #dadce0;
border-radius: .5rem;
display: block;
}

section li img {
width: 4rem;
height: auto;
display: block;
margin-left: auto;
margin-right: auto;
}

section li span {
height: auto;
display: block;
margin: .5rem 0;
text-align: center;
}
16 changes: 16 additions & 0 deletions docs/sub_docs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<head>
<link href="stylesheets/styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
<section id="multirepo">
<ul>
<li>
<a href="/element-array-ephys">
<img src="assets/elements-logo.png" />
<span>Element Array Ephys</span>
</a>
</li>
</ul>
</section>
</body>
19 changes: 19 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
site_name: DataJoint Core Docs
repo_url: https://github.com/datajoint/documentation
repo_name: datajoint/documentation
theme:
name: material
palette:
- media: "(prefers-color-scheme: light)"
scheme: datajoint
toggle:
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode

extra_css:
- stylesheets/extra.css