From a127b31d89a5c307d4cdc7adc998033505f6be88 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Wed, 9 Oct 2024 12:27:20 +1100 Subject: [PATCH] init --- .github/workflows/build.yml | 26 +++++++++++++++++++++++++ docs/index.md | 3 +++ mkdocs.yml | 39 +++++++++++++++++++++++++++++++++++++ readme.md | 19 ++++++++++++++++++ requirements.txt | 3 +++ 5 files changed, 90 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 docs/index.md create mode 100644 mkdocs.yml create mode 100644 readme.md create mode 100644 requirements.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..075423a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build to GH Pages +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + + - run: python3 -m pip install -r requirements.txt + + - run: mkdocs build + + # TODO: once this is deployed to the real site, uncomment + # - run: echo cmfive.com >> site/CNAME + + - name: Deploy to pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: site \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..f0c5f7b --- /dev/null +++ b/docs/index.md @@ -0,0 +1,3 @@ +Placeholder index. + +Visit [the mkdocs material documentation](https://squidfunk.github.io/mkdocs-material/reference/) for references \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..7f119d0 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,39 @@ +site_name: Cosine +repo_url: https://github.com/2pisoftware/cmfive-core +edit_uri: https://github.com/2pisoftware/cosine-docs +site_description: Open source modular MVC PHP framework +plugins: + - section-index + - search +theme: + name: material + logo: assets/logo.svg + favicon: assets/favicon.svg + font: Open Sans + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/lightbulb-outline + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: indigo + toggle: + icon: material/lightbulb + name: Switch to light mode + features: + - navigation.expand + - navigation.instant + - navigation.tracking + - navigation.sections + - navigation.indexes + - navigation.top + markdown_extensions: + - admonition + - pymdownx.details + - pymdownx.highlight + - pymdownx.inlinehilite + - pymdownx.superfences + - pymdownx.tabbed: + alternate_style: true \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..10cd66b --- /dev/null +++ b/readme.md @@ -0,0 +1,19 @@ +# Cosine Documentation + +Documentation for [Cosine](https://github.com/2pisoftware/cmfive-core) + +## Installation + +```sh +# clone +git clone https://github.com/2pisoftware/cosine-docs.git + +# install deps +python3 -m pip install -r requirements.txt + +# serve development site +mkdocs serve + +# build production site +mkdocs build +``` \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3605dc9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +mkdocs==1.5.2 +mkdocs-material==9.1.21 +mkdocs-section-index==0.3.5 \ No newline at end of file