Skip to content

Commit

Permalink
initial site config
Browse files Browse the repository at this point in the history
  • Loading branch information
prnam committed Jul 15, 2024
1 parent c8dd328 commit 0ecaf46
Show file tree
Hide file tree
Showing 10 changed files with 173 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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 ."
}
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 25 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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
Binary file added docs/assets/ashoka-chakra-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/comsect-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
hide:
- toc
- navigation
description: Introduction
---
13 changes: 13 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -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;
}
84 changes: 84 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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 &copy 2024 <a href="https://www.github.com/comsect">Comsect<sup>&reg;</sup></a>. All rights reserved. Read the <a href="/license" target="_blank">License</a>.
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdocs-material
pillow
cairosvg
urllib3
mkdocs-minify-plugin
mkdocs-glightbox

0 comments on commit 0ecaf46

Please sign in to comment.