Skip to content

Commit 32a48a2

Browse files
committed
refactor: Revamp website built on Gatsby.
1 parent b9efcb0 commit 32a48a2

File tree

265 files changed

+31204
-6779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+31204
-6779
lines changed

.github/workflows/draft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
uses: TokTok/ci-tools/.github/workflows/netlify.yml@master
2121
with:
2222
dockerfile: Dockerfile
23-
path: /home/builder/build
23+
path: /
2424
secrets:
2525
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/hs-toxcore
22
/toktok-site
33
_site
4+
*-e
5+
*.swp

Dockerfile

Lines changed: 64 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,65 @@
1-
FROM alpine:3.21
2-
3-
# hadolint ignore=DL3018
4-
RUN ["apk", "add", "--no-cache", \
5-
"curl", \
6-
"g++", \
7-
"gcc", \
8-
"git", \
9-
"graphviz", \
10-
"jekyll", \
11-
"make", \
12-
"pandoc", \
13-
"py3-pip", \
14-
"python3"]
15-
RUN python3 -m venv /path/to/venv
16-
# hadolint ignore=DL3013
17-
RUN . /path/to/venv/bin/activate \
18-
&& pip install --no-cache-dir LinkChecker
19-
20-
RUN ["gem", "install", "--no-document", "guard-livereload", "mdl"]
21-
22-
RUN addgroup -S builder && adduser -SDH -G builder builder
23-
USER builder
24-
25-
WORKDIR /home/builder/build
26-
COPY --chown=builder:builder Makefile /home/builder/build/
27-
COPY --chown=builder:builder entrypoint.sh /home/builder/
28-
29-
COPY --chown=builder:builder toktok/spec.md.dist /home/builder/build/toktok/
30-
RUN ["make", "toktok/spec.md"]
31-
32-
COPY --chown=builder:builder toktok/ /home/builder/build/toktok/
33-
RUN ["make", "toktok-site"]
34-
35-
COPY .md-style.rb /home/builder/build/
36-
RUN ["make", "lint"]
37-
RUN . /path/to/venv/bin/activate \
38-
&& make check \
39-
&& mv toktok-site _site
40-
41-
WORKDIR /home/builder/build/_site
1+
FROM ubuntu:22.04
2+
3+
ENV DEBIAN_FRONTEND="noninteractive"
4+
5+
# hadolint ignore=DL3008
6+
RUN apt-get update && apt-get install -y --no-install-recommends \
7+
curl \
8+
g++ \
9+
git \
10+
make \
11+
pandoc \
12+
python-is-python3 \
13+
python2 \
14+
python3 \
15+
python3-bs4 \
16+
python3-dnspython \
17+
python3-requests \
18+
python3-urllib3 \
19+
python3-xdg \
20+
ruby \
21+
&& apt-get clean \
22+
&& rm -rf /var/lib/apt/lists/* \
23+
&& curl -s -o linkchecker.deb http://ftp.debian.org/debian/pool/main/l/linkchecker/linkchecker_10.0.1-2_amd64.deb \
24+
&& dpkg -i linkchecker.deb \
25+
&& rm linkchecker.deb
26+
27+
RUN ["mkdir", "/usr/local/nvm"]
28+
ENV NVM_DIR=/usr/local/nvm \
29+
NODE_VERSION=14.18.2
30+
31+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
32+
&& . $NVM_DIR/nvm.sh \
33+
&& nvm install $NODE_VERSION \
34+
&& nvm alias default $NODE_VERSION \
35+
&& nvm use default
36+
37+
ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION/lib/node_modules \
38+
PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
39+
40+
RUN ["gem", "install", "--no-document", "mdl"]
41+
42+
RUN groupadd -r -g 1000 builder \
43+
&& useradd --no-log-init -r -g builder -u 1000 builder
44+
45+
COPY toktok /home/builder/build/toktok/
46+
#COPY Makefile /home/builder/build/
47+
COPY entrypoint.sh /home/builder/
48+
49+
#COPY --chown=builder:builder toktok/spec.md.dist /home/builder/build/toktok/
50+
#RUN ["make", "toktok/spec.md"]
51+
52+
#RUN ["make", "hs-toxcore"]
53+
#RUN ["make", "toktok-site"]
54+
55+
#COPY .md-style.rb /home/builder/build/
56+
#RUN ["make", "lint"]
57+
#RUN ["make", "check"]
58+
WORKDIR /home/builder/build/toktok
59+
RUN ["npm", "install"]
60+
RUN ["npm", "run", "build"]
61+
62+
RUN ["mv", "/home/builder/build/toktok/public/", "/_site"]
63+
64+
WORKDIR /_site
4265
ENTRYPOINT ["/home/builder/entrypoint.sh"]

Makefile

Lines changed: 0 additions & 64 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
# website
22

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

5-
## Development
6-
7-
To work on the website you need the following things:
8-
9-
- Jekyll and mdl via ruby gems: `gem install jekyll mdl guard-livereload`.
10-
You might need ruby development headers for this to work: `apt-get install ruby-dev`.
11-
Also in case of trouble [this](https://github.com/jekyll/jekyll/issues/5165#issuecomment-236341627) may help (install `gem install bundler`).
12-
`mdl` is optional for linting the markdown.
13-
- pandoc, version 1.10 or higher
14-
(optional for building the spec).
15-
16-
Install it via `apt-get install pandoc`,
17-
or `cabal install pandoc`, if you prefer the haskell way of doing it (this may take a while to install though).
18-
See <http://pandoc.org/installing.html> for other methods.
19-
- linkchecker via `apt-get install linkchecker`
20-
(optional for link checking).
21-
22-
The follwing make targets are available:
23-
24-
- `make all`: build the complete website including external content.
25-
- `make changelog`: download changelogs (included in `all`)
26-
- `make roadmap`: download roadmaps (included in `all`)
27-
- `make spec`: download and parse the spec with pandoc (included in `all`)
28-
- `make lint`: run markdown linter `mdl`
29-
- `make check`: run linkchecker
5+
Template: [proapp](https://www.free-css.com/free-css-templates/page250/proapp)

toktok/.gitignore

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
/Gemfile.lock
2-
/_site
3-
/.sass-cache
4-
/.jekyll-metadata
5-
6-
# auto generated files
7-
/changelog/c-toxcore.md
8-
/roadmap/c-toxcore.md
9-
/spec.md
10-
/res
1+
# Project dependencies
2+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
3+
node_modules
4+
.cache/
5+
# Build directory
6+
public/
7+
.DS_Store
8+
yarn-error.log

toktok/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v13.12.0

toktok/CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

toktok/Gemfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

toktok/Guardfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)