mirror of
https://github.com/len0rd/personal-website.git
synced 2025-04-19 13:01:58 -04:00
fixes/updates. use pydata theme. use drawio extension in devcontainer
This commit is contained in:
parent
67fd3d91af
commit
4285425051
7
.devcontainer/devcontainer.json
Normal file
7
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"context": "../",
|
||||||
|
"dockerfile": "../Dockerfile"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8090]
|
||||||
|
}
|
42
Dockerfile
42
Dockerfile
|
@ -1,25 +1,29 @@
|
||||||
FROM node:14-alpine
|
FROM python:3.11-bullseye
|
||||||
|
|
||||||
# Create app directory
|
ADD pip-requirements.txt /tmp/pip-requirements.txt
|
||||||
WORKDIR /usr/src/app
|
RUN pip install -r /tmp/pip-requirements.txt \
|
||||||
|
&& rm /tmp/pip-requirements.txt
|
||||||
|
|
||||||
# Install app dependencies
|
# install drawio for doc diagram gen
|
||||||
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
ENV DRAWIO_VERSION "21.1.2"
|
||||||
# where available (npm@5+)
|
RUN apt update \
|
||||||
COPY package*.json ./
|
&& apt install -yq --no-install-recommends \
|
||||||
|
xvfb \
|
||||||
RUN npm install
|
wget \
|
||||||
|
libnotify4 \
|
||||||
RUN apk add --no-cache python3 bash \
|
libgbm1 \
|
||||||
&& ln -sf python3 /usr/bin/python
|
libasound2 \
|
||||||
|
libxss1 \
|
||||||
|
libsecret-1-0 \
|
||||||
|
&& wget https://github.com/jgraph/drawio-desktop/releases/download/v${DRAWIO_VERSION}/drawio-amd64-${DRAWIO_VERSION}.deb \
|
||||||
|
&& apt install -y ./drawio-amd64-${DRAWIO_VERSION}.deb \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& rm -rf drawio-amd64-${DRAWIO_VERSION}.deb
|
||||||
|
ENV XVFB_DISPLAY ":42"
|
||||||
|
|
||||||
# Bundle app source
|
# Bundle app source
|
||||||
COPY . .
|
# COPY . .
|
||||||
|
# RUN ablog build
|
||||||
RUN python3 -m ensurepip \
|
|
||||||
&& pip3 install --no-cache --upgrade pip setuptools \
|
|
||||||
&& pip3 install -r pip-requirements.txt
|
|
||||||
|
|
||||||
EXPOSE 8090
|
EXPOSE 8090
|
||||||
|
CMD [ "ablog", "serve", "-p", "8090" ]
|
||||||
CMD [ "npm", "start" ]
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<mxfile host="65bd71144e">
|
<mxfile host="65bd71144e">
|
||||||
<diagram id="SKV8PHPIui5c4Fc6kAOh" name="Page-1">
|
<diagram id="SKV8PHPIui5c4Fc6kAOh" name="Page-1">
|
||||||
<mxGraphModel dx="889" dy="665" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
<mxGraphModel dx="623" dy="291" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||||
<root>
|
<root>
|
||||||
<mxCell id="0"/>
|
<mxCell id="0"/>
|
||||||
<mxCell id="1" parent="0"/>
|
<mxCell id="1" parent="0"/>
|
||||||
|
|
24
conf.py
24
conf.py
|
@ -10,6 +10,7 @@ extensions = [
|
||||||
"ablog",
|
"ablog",
|
||||||
"sphinx.ext.intersphinx",
|
"sphinx.ext.intersphinx",
|
||||||
"sphinx_design",
|
"sphinx_design",
|
||||||
|
"sphinxcontrib.drawio",
|
||||||
]
|
]
|
||||||
|
|
||||||
html_static_path = ["_static"]
|
html_static_path = ["_static"]
|
||||||
|
@ -26,34 +27,29 @@ fontawesome_included = True
|
||||||
html_baseurl = blog_baseurl
|
html_baseurl = blog_baseurl
|
||||||
html_title = blog_title
|
html_title = blog_title
|
||||||
|
|
||||||
html_theme = "sphinx_book_theme"
|
html_theme = "pydata_sphinx_theme"
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
"repository_url": "https://github.com/len0rd/",
|
|
||||||
"search_bar_text": "search ...",
|
"search_bar_text": "search ...",
|
||||||
"show_prev_next": False,
|
"show_prev_next": False,
|
||||||
"navbar_center": [],
|
"navbar_center": [],
|
||||||
"use_fullscreen_button": False,
|
|
||||||
"use_repository_button": True,
|
|
||||||
# "footer_items": ["copyright", "sphinx-version", x"last-updated"],
|
|
||||||
}
|
}
|
||||||
html_favicon = "assets/img/favicon.ico"
|
html_favicon = "assets/img/favicon.ico"
|
||||||
|
|
||||||
html_sidebars = {
|
html_sidebars = {
|
||||||
"*": [
|
"*": [
|
||||||
"sitename.html",
|
"ablog/recentposts.html",
|
||||||
"search-field.html",
|
"ablog/archives.html",
|
||||||
"recentposts.html",
|
|
||||||
"archives.html",
|
|
||||||
],
|
],
|
||||||
"posts/**": [
|
"posts/**": [
|
||||||
"sitename.html",
|
"ablog/postcard.html",
|
||||||
"search-field.html",
|
"ablog/recentposts.html",
|
||||||
"postcard.html",
|
"ablog/archives.html",
|
||||||
"recentposts.html",
|
|
||||||
"archives.html",
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
html_context = {"html_title": html_title}
|
html_context = {"html_title": html_title}
|
||||||
|
|
||||||
pygments_style = "sas"
|
pygments_style = "sas"
|
||||||
|
|
||||||
|
drawio_headless = True
|
||||||
|
drawio_no_sandbox = True
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
sphinx
|
sphinx
|
||||||
ablog
|
ablog
|
||||||
sphinx-design
|
sphinx-design
|
||||||
pydata_sphinx_theme
|
|
||||||
sphinxcontrib-youtube
|
sphinxcontrib-youtube
|
||||||
sphinx-book-theme
|
pydata-sphinx-theme
|
||||||
|
sphinxcontrib-drawio
|
||||||
|
|
|
@ -84,7 +84,7 @@ Making unit-testable code in embedded development can be challenging. There is a
|
||||||
|
|
||||||
What does that look like? Something like this:
|
What does that look like? Something like this:
|
||||||
|
|
||||||
.. image:: ../assets/img/writeup/embedded_dev_primer/hal_concept.svg
|
.. drawio-image:: ../assets/diagrams/hal_concept.drawio
|
||||||
|
|
||||||
Notice all SOC/MCU-specific code is encapsulated down in a single library which we abstract out with an interface layer immediately.
|
Notice all SOC/MCU-specific code is encapsulated down in a single library which we abstract out with an interface layer immediately.
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ What are "board-specifics"? This is the term I use to describe the configuration
|
||||||
|
|
||||||
Here's an extension of the earlier diagram with these concepts added:
|
Here's an extension of the earlier diagram with these concepts added:
|
||||||
|
|
||||||
.. image:: ../assets/img/writeup/embedded_dev_primer/hal_concept_with_board.svg
|
.. drawio-image:: ../assets/diagrams/hal_concept_with_board.drawio
|
||||||
|
|
||||||
Benefits:
|
Benefits:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue