Skip to content
Draft
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/hs-toxcore
/toktok-site
_site
*-e
*.swp
101 changes: 62 additions & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,65 @@
FROM alpine:3.21

# hadolint ignore=DL3018
RUN ["apk", "add", "--no-cache", \
"curl", \
"g++", \
"gcc", \
"git", \
"graphviz", \
"jekyll", \
"make", \
"pandoc", \
"py3-pip", \
"python3"]
RUN python3 -m venv /path/to/venv
# hadolint ignore=DL3013
RUN . /path/to/venv/bin/activate \
&& pip install --no-cache-dir LinkChecker

RUN ["gem", "install", "--no-document", "guard-livereload", "mdl"]

RUN addgroup -S builder && adduser -SDH -G builder builder
USER builder

WORKDIR /home/builder/build
COPY --chown=builder:builder Makefile /home/builder/build/
COPY --chown=builder:builder entrypoint.sh /home/builder/

COPY --chown=builder:builder toktok/spec.md.dist /home/builder/build/toktok/
RUN ["make", "toktok/spec.md"]

COPY --chown=builder:builder toktok/ /home/builder/build/toktok/
RUN ["make", "toktok-site"]

COPY .md-style.rb /home/builder/build/
RUN ["make", "lint"]
RUN . /path/to/venv/bin/activate \
&& make check \
&& mv toktok-site _site
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND="noninteractive"

# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
g++ \
git \
make \
pandoc \
python-is-python3 \
python2 \
python3 \
python3-bs4 \
python3-dnspython \
python3-requests \
python3-urllib3 \
python3-xdg \
ruby \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl -s -o linkchecker.deb http://ftp.debian.org/debian/pool/main/l/linkchecker/linkchecker_10.0.1-2_amd64.deb \
&& dpkg -i linkchecker.deb \
&& rm linkchecker.deb

RUN ["mkdir", "/usr/local/nvm"]
ENV NVM_DIR=/usr/local/nvm \
NODE_VERSION=14.18.2

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \

Check warning on line 31 in Dockerfile

View check run for this annotation

codefactor.io / CodeFactor

Dockerfile#L31

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check. (DL4006)
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default

ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION/lib/node_modules \
PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH

RUN ["gem", "install", "--no-document", "mdl"]

RUN groupadd -r -g 1000 builder \
&& useradd --no-log-init -r -g builder -u 1000 builder

COPY toktok /home/builder/build/toktok/
#COPY Makefile /home/builder/build/
COPY entrypoint.sh /home/builder/

#COPY --chown=builder:builder toktok/spec.md.dist /home/builder/build/toktok/
#RUN ["make", "toktok/spec.md"]

#RUN ["make", "hs-toxcore"]
#RUN ["make", "toktok-site"]

#COPY .md-style.rb /home/builder/build/
#RUN ["make", "lint"]
#RUN ["make", "check"]
WORKDIR /home/builder/build/toktok
RUN ["npm", "install"]
RUN ["npm", "run", "build"]

RUN ["mv", "/home/builder/build/toktok/public/", "/home/builder/build/_site"]

WORKDIR /home/builder/build/_site
ENTRYPOINT ["/home/builder/entrypoint.sh"]
64 changes: 0 additions & 64 deletions Makefile

This file was deleted.

28 changes: 2 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
# website

The new website with something better than Yst (also, change the title)
The new website.

## Development

To work on the website you need the following things:

- Jekyll and mdl via ruby gems: `gem install jekyll mdl guard-livereload`.
You might need ruby development headers for this to work: `apt-get install ruby-dev`.
Also in case of trouble [this](https://github.com/jekyll/jekyll/issues/5165#issuecomment-236341627) may help (install `gem install bundler`).
`mdl` is optional for linting the markdown.
- pandoc, version 1.10 or higher
(optional for building the spec).

Install it via `apt-get install pandoc`,
or `cabal install pandoc`, if you prefer the haskell way of doing it (this may take a while to install though).
See <http://pandoc.org/installing.html> for other methods.
- linkchecker via `apt-get install linkchecker`
(optional for link checking).

The follwing make targets are available:

- `make all`: build the complete website including external content.
- `make changelog`: download changelogs (included in `all`)
- `make roadmap`: download roadmaps (included in `all`)
- `make spec`: download and parse the spec with pandoc (included in `all`)
- `make lint`: run markdown linter `mdl`
- `make check`: run linkchecker
Template: [proapp](https://www.free-css.com/free-css-templates/page250/proapp)
18 changes: 8 additions & 10 deletions toktok/.gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/Gemfile.lock
/_site
/.sass-cache
/.jekyll-metadata

# auto generated files
/changelog/c-toxcore.md
/roadmap/c-toxcore.md
/spec.md
/res
# Project dependencies
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
.cache/
# Build directory
public/
.DS_Store
yarn-error.log
1 change: 1 addition & 0 deletions toktok/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v13.12.0
1 change: 0 additions & 1 deletion toktok/CNAME

This file was deleted.

3 changes: 0 additions & 3 deletions toktok/Gemfile

This file was deleted.

3 changes: 0 additions & 3 deletions toktok/Guardfile

This file was deleted.

21 changes: 0 additions & 21 deletions toktok/_config.yml

This file was deleted.

33 changes: 0 additions & 33 deletions toktok/_data/repos.yml

This file was deleted.

22 changes: 0 additions & 22 deletions toktok/_includes/footer.html

This file was deleted.

19 changes: 0 additions & 19 deletions toktok/_includes/head.html

This file was deleted.

22 changes: 0 additions & 22 deletions toktok/_includes/nav.html

This file was deleted.

17 changes: 0 additions & 17 deletions toktok/_includes/navitems.html

This file was deleted.

7 changes: 0 additions & 7 deletions toktok/_includes/repository.html

This file was deleted.

Loading
Loading