diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..d6df788c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: website + +on: + push: + branches: + - main + +env: + PUBLISH_DIRECTORY: public + +permissions: + contents: write + +jobs: + publish: + if: github.event_name == 'push' || github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Checkout Production + if: github.ref_name == 'main' + uses: actions/checkout@v4 + with: + ref: asf-site + path: ${{ env.PUBLISH_DIRECTORY }} + #- name: Install Asciidoctor + # run: | + # sudo apt-get update + # sudo apt-get install -y asciidoctor + - name: Prepare + working-directory: ${{ env.PUBLISH_DIRECTORY }} + run: | + rm -rf stylesheets + - name: Build Hugo site + run: | + npm install + npm run clean + npm run build:production + - name: Deploy to ASF + working-directory: ${{ env.PUBLISH_DIRECTORY }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "ops+github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Published changes from $GITHUB_SHA" + git push \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..fabbc3da --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +/public +resources/ +node_modules/ +package-lock.json +.hugo_build.lock +.env +.direnv/ +.vscode +.idea +openserverless-cli +openserverless-task + + diff --git a/DISCLAIMER b/DISCLAIMER new file mode 100644 index 00000000..b505beba --- /dev/null +++ b/DISCLAIMER @@ -0,0 +1,11 @@ +Apache OpenServerless (Incubating) is an effort undergoing incubation at the Apache +Software Foundation (ASF), sponsored by the Apache Incubator PMC. + +Incubation is required of all newly accepted projects until a further review +indicates that the infrastructure, communications, and decision making process +have stabilized in a manner consistent with other successful ASF projects. + +While incubation status is not necessarily a reflection of the completeness +or stability of the code, it does indicate that the project has yet to be +fully endorsed by the ASF. + diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..9b094683 --- /dev/null +++ b/NOTICE @@ -0,0 +1,6 @@ +Apache OpenServerless (Incubating) +Copyright 2024 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 00000000..99e050f7 --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,51 @@ +version: '3' + +tasks: + + default: task -l + + import-tools: + desc: import tool documentation + silent: true + cmds: + - test -d "openserverless-cli" && git pull || git clone https://github.com/apache/openserverless-cli + - | + find openserverless-cli/tools -name "*.md" | while read file + do + name=$(basename $file .md) + echo "Working on tool ${name} in file ${file}" + mkdir -p content/en/docs/reference/tools/$name + echo -e "---\ntitle: $name\n---\n" > content/en/docs/reference/tools/$name/_index.md + sed '/^# /d' "$file" >> content/en/docs/reference/tools/$name/_index.md + # cat $file >> content/en/docs/reference/tools/$name/_index.md + done + - cp tools.md content/en/docs/reference/tools/_index.md + #- rm -rf openserverless-cli + + import-task: + desc: import task documentation + silent: true + cmds: + - test -d "openserverless-task" && git pull || git clone https://github.com/apache/openserverless-task + - | + find openserverless-task -name "docopts.md" | while read file + do + tgt=$(echo $file | sed -e 's!openserverless-task/!!' -e 's/docopts/_index/') + echo "> Converting ${file} to ${tgt}" + mkdir -p "content/en/docs/reference/tasks/$(dirname $tgt)" + name="$(basename $(dirname "Tasks"/$tgt))" + echo -e "---\ntitle: ${name}\n---\n" >content/en/docs/reference/tasks/$tgt + sed '/^# /d' "$file" >>content/en/docs/reference/tasks/$tgt + #cat $file >>content/en/docs/reference/tasks/$tgt + done + #- rm -rf openserverless-task + + preview: + desc: preview the websites + cmds: + - hugo server + + debug: + desc: debug the websites + cmds: + - hugo server --ignoreCache --debug --disableFastRender \ No newline at end of file diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss new file mode 100644 index 00000000..d528fa66 --- /dev/null +++ b/assets/scss/_styles_project.scss @@ -0,0 +1,107 @@ +/* baloo-2-regular - latin */ +@font-face { + font-family: 'Baloo 2'; + font-style: normal; + font-weight: 400; + src: url('/fonts/baloo-2-v21-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ + url('/fonts/baloo-2-v21-latin-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ +} + + +/* baloo-2-700 - latin */ +@font-face { + font-family: 'Baloo 2'; + font-style: normal; + font-weight: 700; + src: url('/fonts/baloo-2-v21-latin-700.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ + url('/fonts/baloo-2-v21-latin-700.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ +} + +/* quattrocento-regular - latin */ +@font-face { + font-family: 'Quattrocento'; + font-style: normal; + font-weight: 400; + src: url('/fonts/quattrocento-v23-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ + url('/fonts/quattrocento-v23-latin-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ +} + +p { font-family: "Quattrocento" !important;} + +.navbar, aside, .quote-title { + font-family: "Baloo 2" !important; +} + +h1, h2, h3 ,h4, h5, .lead { + font-family: "Baloo 2" !important; +} + +div.td-content h1, +div.td-content h2, +div.td-content h3, +div.td-content h4, +div.td-content h5, +div.td-content h6 { + color: #265d85 !important; +} + +.td-sidebar-nav-active-item { + color: #ff0000; +} + +aside{ + font-size: 1em !important; +} + +.text-black { color: black; } +.text-default { color: black; } +.text-white { color: white; } + +.center-image-container { + text-align: center; +} + +.center-image-container img { + display: inline-block; + margin: auto; +} + +.rounded-image { + border-radius: 15px; + overflow: hidden; + display: inline-block; +} + +#ops_asc_cast { + width: 100%; + margin:0 auto; +} + +.td-box--6 { + background-color: #245b80; + color: #fff; +} + +.disclaimer p { + font-size: 16px; + font-family: "Baloo 2" !important; +} + +.asf-logo { + background: white; + padding: 20px; + margin: 8px; +} + +.ops-asciinema-ext { + width: 90%; /* Default to 90% of the screen width */ + max-width: 600px; /* Ensure it doesn't exceed 450px */ + margin: 0 auto; /* Center the div horizontally */ +} + +@media only screen and (min-width: 600px) { + .ops-asciinema-ext { + width: 600px; /* For screens wider than 450px, set the width to 450px */ + } +} + diff --git a/assets/scss/_variables_project.scss b/assets/scss/_variables_project.scss new file mode 100644 index 00000000..418c6e02 --- /dev/null +++ b/assets/scss/_variables_project.scss @@ -0,0 +1,4 @@ +$font-family-base: "Quattrocento"; +$td-enable-google-fonts: false; + +$primary: #265d85 !default; \ No newline at end of file diff --git a/content/en/_index.md b/content/en/_index.md new file mode 100644 index 00000000..45302993 --- /dev/null +++ b/content/en/_index.md @@ -0,0 +1,73 @@ +--- +title: Apache OpenServerless™ +--- + +{{< blocks/cover title="Welcome to Apache OpenServerless™!" height="full" >}} + + + Learn More + + + Download + + +