Skip to content

Commit

Permalink
Minimal demo redhat theme
Browse files Browse the repository at this point in the history
  • Loading branch information
aleixhub committed Jul 22, 2024
1 parent 4519435 commit 8ae2676
Show file tree
Hide file tree
Showing 160 changed files with 37,275 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax = docker/dockerfile:1.0-experimental
FROM registry.access.redhat.com/ubi8/nodejs-12 as podmandevcontainer

USER root

RUN dnf update -y && npm i -g @antora/[email protected] @antora/[email protected] \
&& dnf update -y \
&& npm rm --global npx && npm install --global npx && npm install --global gulp \
&& dnf clean all && rm -r /var/cache/dnf

RUN wget https://github.com/mikefarah/yq/releases/download/3.4.0/yq_linux_amd64 -O /usr/local/bin/yq && \
chmod 755 /usr/local/bin/yq

RUN wget https://github.com/wercker/stern/releases/download/1.11.0/stern_linux_amd64 -O /usr/local/bin/stern && \
chmod 755 /usr/local/bin/stern

RUN curl -L https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz | \
tar -xvzf - -C /usr/local/bin/ oc && chmod 755 /usr/local/bin/oc && ln -s /usr/local/bin/oc /usr/local/bin/kubectl

# If running (rootless) podman, keep the root user so that outside the container it will match
# the host user. Otherwise run as default user
FROM podmandevcontainer AS devcontainer
RUN chown -R default $HOME
USER default
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/javascript-node
{
"name": "Course UI",
"build": {
"dockerfile": "Dockerfile",
"target": "${env:DEVCONTAINER_TARGET_PREFIX}devcontainer",
},

"runArgs": [
"-v", "${env:HOME}/.kube:/opt/app-root/src/.kube:Z",
"-v", "${env:HOME}/.gitconfig:/opt/app-root/src/.gitconfig:Z",
"-e", "WORKSPACE_ROOT=${containerWorkspaceFolder}"
],

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"editor.tabCompletion": "on",
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"ms-azuretools.vscode-docker",
"joaompinto.asciidoctor-vscode",
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000],

// Specifies a command that should be run after the container has been created.
"postCreateCommand": "rsync -a .devcontainer/workspace-setup/ ${containerWorkspaceFolder}/.vscode/ --ignore-existing",
}
48 changes: 48 additions & 0 deletions .devcontainer/workspace-setup/asciidoc.json.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"Add Tabs": {
"prefix": "tabs",
"body": [
"[tabs]",
"====",
"${1:tab1}::",
"+",
"--",
"--",
"${2:tab2}::",
"+",
"--",
"--",
"===="
],
"description": "Add Tabs macro"
},
"Add Navigation": {
"prefix": "nav",
"body": [
"${1|*,**,***|} xref:${2:page.adoc}[${3:Nav Title}]"
],
"description": "Add new navigation"
},
"Console Input": {
"prefix": "input",
"body": [
"[.console-input]",
"[source,${1:bash},subs=\"${2:+macros,+attributes}\"]",
"----",
"${3:echo \"Hello World\"}",
"----"
],
"description": "Adds Console Input source fragment"
},
"Console Output": {
"prefix": "output",
"body": [
"[.console-output]",
"[source,${1:bash},subs=\"${2:+macros,+attributes}\"]",
"----",
"${3:\"Hello World\"}",
"----"
],
"description": "Adds Console Output source fragment"
}
}
17 changes: 17 additions & 0 deletions .devcontainer/workspace-setup/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build and watch dev-site",
"type": "npm",
"script": "dev",
"problemMatcher": [],
"dependsOn":[ "npm install" ]
},
{
"label": "npm install",
"type": "npm",
"script": "install"
}
]
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

15 changes: 15 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "standard",
"rules": {
"arrow-parens": ["error", "always"],
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline"
}],
"max-len": [1, 120, 2],
"spaced-comment": "off",
"padded-blocks": "off"
}
}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/build/
/node_modules/
/public/
yarn.lock
.tool-versions

.vscode/

#MacOSX
.DS_Store
4 changes: 4 additions & 0 deletions .gulp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"description": "Build tasks for the Antora default UI project",
"flags.tasksDepth": 1
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
7 changes: 7 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "stylelint-config-standard",
"rules": {
"comment-empty-line-before": null,
"no-descending-specificity": null,
}
}
Loading

0 comments on commit 8ae2676

Please sign in to comment.