diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..af30596 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,5 @@ +{ + "name": "COW Act", + "image": "squidfunk/mkdocs-material:latest", + "postCreateCommand": "pip install --upgrade pip && pip3 install --user -r requirements.txt && mkdocs new ." +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..51ce1bb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: deploy-website +on: + push: + branches: + - main + paths: + - 'docs/**' # Watch for changes in the docs folder + - 'mkdocs.yml' # Watch for changes in the mkdocs.yml file +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + sparse-checkout: | + docs + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v2.1.8 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: sudo apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev + - run: sudo apt-get install pngquant + - run: pip install --upgrade pip && pip install --user -r requirements.txt + - run: mkdocs gh-deploy --force diff --git a/.gitignore b/.gitignore index 82f9275..ab74e15 100644 --- a/.gitignore +++ b/.gitignore @@ -160,3 +160,4 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +.DS_Store diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2a63986 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +pages: + stage: deploy + image: python:latest + cache: + key: "$CI_COMMIT_REF_NAME" + paths: + - /var/cache/apt/archives + - /root/.cache/pip + - /usr/local/lib/python3.*/site-packages + before_script: + - apt-get update -y + - apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev + - pip install --upgrade pip + - pip install --user -r requirements.txt + - export PATH="$PATH:$(python -m site --user-base)/bin" + script: + - mkdocs build --site-dir public + artifacts: + paths: + - public + rules: + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + changes: + - docs/* + - mkdocs.yml diff --git a/docs/assets/ashoka-chakra-logo.png b/docs/assets/ashoka-chakra-logo.png new file mode 100644 index 0000000..8e0a95a Binary files /dev/null and b/docs/assets/ashoka-chakra-logo.png differ diff --git a/docs/assets/comsect-logo.png b/docs/assets/comsect-logo.png new file mode 100644 index 0000000..b447fb9 Binary files /dev/null and b/docs/assets/comsect-logo.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..62ce9fc --- /dev/null +++ b/docs/index.md @@ -0,0 +1,6 @@ +--- +hide: + - toc + - navigation +description: Introduction +--- diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css new file mode 100644 index 0000000..df8dd2d --- /dev/null +++ b/docs/stylesheets/extra.css @@ -0,0 +1,13 @@ +[data-md-color-scheme="default"] { + --md-primary-fg-color: #06038D; + --md-typeset-a-color: #000000; +} + +[data-md-color-scheme="slate"] { + --md-primary-fg-color: #06038D; + --md-typeset-a-color: #FFFFFF; +} + +div.md-content { + text-align: justify; +} diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..2429044 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,84 @@ +site_name: Code On Wages Act +site_url: https://www.comsect.in/cow-act/ +site_author: Comsect® +site_description: The Code On Wages Act, 2019 +theme: + name: material + language: en + logo: assets/ashoka-chakra-logo.png + favicon: assets/comsect-logo.png + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: light blue + accent: light blue + toggle: + icon: material/weather-night + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: light blue + accent: light blue + toggle: + icon: material/weather-sunny + name: Switch to light mode + features: + - navigation.footer + - navigation.tabs + - navigation.sections + - content.tooltips + - content.code.copy + + +extra_css: + - stylesheets/extra.css + +markdown_extensions: + - pymdownx.caret + - pymdownx.mark + - pymdownx.tilde + - footnotes + - admonition + - pymdownx.details + - pymdownx.superfences + - abbr + - attr_list + - md_in_html + - def_list + - pymdownx.snippets: + auto_append: + - includes/abbreviations.md + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + - pymdownx.tasklist: + custom_checkbox: true + clickable_checkbox: true + +extra: + generator: false + social: + - icon: fontawesome/brands/linkedin + link: https://linkedin.com/company/comsect + name: Comsect™ on LinkedIn + - icon: fontawesome/brands/github + link: https://github.com/comsect + name: Comsect™ on GitHub + - icon: fontawesome/brands/youtube + link: https://youtube.com/@comsect + name: Comsect™ on YouTube + +plugins: + - search: + lang: en + - minify: + minify_html: true + - social: + cards_layout_options: + background_color: "#06038D" + - glightbox + +nav: + - Introduction: index.md + +copyright: Copyright © 2024 Comsect®. All rights reserved. Read the License. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2be2f85 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +mkdocs-material +pillow +cairosvg +urllib3 +mkdocs-minify-plugin +mkdocs-glightbox