Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mermaid rendering #572

Merged
merged 35 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
501ae87
add mermaid-cli
falgon Aug 27, 2024
64fdbda
Merge branch 'develop' of github.com:falgon/roki-web into add-mermaid…
falgon Aug 27, 2024
dc67422
add comments
falgon Aug 28, 2024
0e9525d
add number of thread options
falgon Aug 28, 2024
7e87508
[ci skip] Merge branch 'develop' of github.com:falgon/roki-web into a…
falgon Aug 30, 2024
12220b3
[skip ci] Merge branch 'develop' of github.com:falgon/roki-web into a…
falgon Sep 4, 2024
839585e
[skip ci] Merge branch 'develop' of github.com:falgon/roki-web into a…
falgon Sep 4, 2024
696bb3b
trigger commit
falgon Sep 9, 2024
73ae627
add mermaid graph for test
falgon Sep 10, 2024
c433afb
upgrade mermaid v11.1.1
falgon Sep 10, 2024
15e2b55
fix to `RawInline`
falgon Sep 10, 2024
95b8171
refactoring
falgon Sep 10, 2024
1831656
refactor dependencies
falgon Sep 10, 2024
fca30bd
Restyled by stylish-haskell
restyled-commits Sep 10, 2024
d8e440c
Merge pull request #585 from falgon/restyled/add-mermaid-rendering
falgon Sep 10, 2024
683ce16
fix dependencies
falgon Sep 10, 2024
1dcf5c1
fix dependencies of library
falgon Sep 10, 2024
da3093b
fix dependencies of library
falgon Sep 10, 2024
2232976
add chromium-browser for puppeteer
falgon Sep 10, 2024
2f849b1
[skip ci] Merge branch 'develop' of github.com:falgon/roki-web into a…
falgon Sep 10, 2024
1ed1c0c
add `PUPPETEER_EXECUTABLE_PATH` env var
falgon Sep 10, 2024
ea4912e
add `PUPPETEER_EXECUTABLE_PATH` to Dockerfile
falgon Sep 10, 2024
4f8c105
install chromium (not chromium-browser) by snap
falgon Sep 10, 2024
76bb34f
use chromium (not chromium-browser) in Dockerfile
falgon Sep 10, 2024
40cd291
fix indent
falgon Sep 10, 2024
71950e5
add centering to mermaid svg
falgon Sep 11, 2024
7946e41
Update src/Media/SVG.hs
falgon Sep 11, 2024
d7585d2
Update .github/workflows/build_pr.yml
falgon Sep 11, 2024
b88387e
Update .github/workflows/build.yml
falgon Sep 11, 2024
a5ede56
support caption for mermaid SVG
falgon Sep 11, 2024
4056f0e
add caption test
falgon Sep 11, 2024
0c275ed
resolve conflicts
falgon Sep 11, 2024
d20a365
fix md and comment
falgon Sep 11, 2024
d87fc5a
fix caption order
falgon Sep 11, 2024
c1badde
remove extra mermaid
falgon Sep 11, 2024
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
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,24 @@ jobs:
with:
path: ~/.stack
key: stack-v2-${{ runner.os }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('stack.yaml.lock') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('docker/.env') }}
- name: Install tools
- name: Install tools (apt)
uses: awalsh128/cache-apt-pkgs-action@v1.4.2
with:
packages: libxml2-utils
version: 1.0
- name: snap cache
uses: actions/cache@v2
env:
cache-name: cache-snap-packages
with:
path: ~/snap
key: ${{ runner.os }}-snap-${{ env.cache-name }}-${{ hashFiles('**/snap-packages.txt') }}
restore-keys: |
${{ runner.os }}-snap-${{ env.cache-name }}-
${{ runner.os }}-snap-
${{ runner.os }}-
- name: Install tools (snap)
run: sudo snap install chromium
- name: Setup Stack
if: steps.site-gen-cache.outputs.cache-hit != 'true' && steps.stack-cache.outputs.cache-hit != 'true'
run: |
Expand All @@ -64,7 +77,9 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Export values
run: echo "ROKI_WEB_GH_ACTIONS_NODE_VERSION=$(node --version)" >> "$GITHUB_ENV"
run: |
echo "ROKI_WEB_GH_ACTIONS_NODE_VERSION=$(node --version)" >> "$GITHUB_ENV"
echo "PUPPETEER_EXECUTABLE_PATH=$(which chromium)" >> "$GITHUB_ENV"
- name: Node module cache
uses: actions/cache@v4
id: node-cache
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/build_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,24 @@ jobs:
ghc-version: ${{ env.ghc_version }}
enable-stack: true
stack-version: ${{ env.stack_version }}
- name: Install tools
- name: Install tools (apt)
uses: awalsh128/cache-apt-pkgs-action@v1.4.2
with:
packages: libxml2-utils parallel
version: 1.0
- name: snap cache
uses: actions/cache@v2
env:
cache-name: cache-snap-packages
with:
path: ~/snap
key: ${{ runner.os }}-snap-${{ env.cache-name }}-${{ hashFiles('**/snap-packages.txt') }}
restore-keys: |
${{ runner.os }}-snap-${{ env.cache-name }}-
${{ runner.os }}-snap-
${{ runner.os }}-
- name: Install tools (snap)
run: sudo snap install chromium
- name: Setup Stack
if: steps.site-gen-cache.outputs.cache-hit != 'true' && steps.stack-cache.outputs.cache-hit != 'true'
run: |
Expand All @@ -68,7 +81,9 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: Export values
run: echo "ROKI_WEB_GH_ACTIONS_NODE_VERSION=$(node --version)" >> "$GITHUB_ENV"
run: |
echo "ROKI_WEB_GH_ACTIONS_NODE_VERSION=$(node --version)" >> "$GITHUB_ENV"
echo "PUPPETEER_EXECUTABLE_PATH=$(which chromium)" >> "$GITHUB_ENV"
- name: Node module cache
uses: actions/cache@v4
id: node-cache
Expand Down
2 changes: 2 additions & 0 deletions docker/contents/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN sed -i 's@archive.ubuntu.com@ftp.jaist.ac.jp/pub/Linux@g' /etc/apt/sources.l
&& apt-get -y -o=Dpkg::Use-Pty=0 -qq install --no-install-recommends \
curl \
ca-certificates \
chromium \
language-pack-ja \
build-essential \
libffi-dev \
Expand All @@ -34,6 +35,7 @@ ENV LANG=ja_JP.UTF-8 \
COPY . /opt/src
WORKDIR /opt/src
RUN export BOOTSTRAP_HASKELL_GHC_VERSION="$(yq '.compiler' ./stack.yaml | cut -f2 -d-)" \
export PUPPETEER_EXECUTABLE_PATH="$(which chromium)" \
&& curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
RUN source "$HOME/.ghcup/env" \
&& stack config set install-ghc false --global \
Expand Down
2 changes: 2 additions & 0 deletions docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RUN sed -i 's@archive.ubuntu.com@ftp.jaist.ac.jp/pub/Linux@g' /etc/apt/sources.l
build-essential \
curl \
ca-certificates \
chromium \
language-pack-ja \
libtinfo-dev \
git \
Expand Down Expand Up @@ -39,6 +40,7 @@ ENV LANG=ja_JP.UTF-8 \
BOOTSTRAP_HASKELL_NONINTERACTIVE=1
COPY --chown=rw-dev:rw-dev . /home/rw-dev/src
WORKDIR /home/rw-dev/src
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
RUN curl -sSo- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash \
&& export NVM_DIR="${HOME}/.nvm" \
&& [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" || true \
Expand Down
Loading
Loading