From deb2e1289bef567850fe8e21a2607f1c4f3b5d0d Mon Sep 17 00:00:00 2001 From: Lonnie Ezell Date: Mon, 2 Oct 2023 23:31:00 -0500 Subject: [PATCH] Add site docs --- .editorconfig | 15 ++++++++++ .github/workflows/docs.yml | 23 +++++++++++++++ README.md | 2 +- docs/assets/github-dark-dimmed.css | 15 ++++++++++ mkdocs.yml | 45 ++++++++++++++++++++++++++++++ 5 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 .editorconfig create mode 100644 .github/workflows/docs.yml create mode 100644 docs/assets/github-dark-dimmed.css create mode 100644 mkdocs.yml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7382bb8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{yml,yaml}] +indent_size = 2 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..495a3e5 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,23 @@ +name: Docs + +on: + push: + branches: + - develop + paths: + - "docs/*" + - "mkdocs.yml" + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force diff --git a/README.md b/README.md index c24b700..628f272 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ Class: `Myth\Collection\Collection` The `Collection` class provides a set of functions to work with arrays. It combines some of the best features from Javascript's Array object, PHP's array, and even borrowed ideas from other frameworks. -See [the docs](./docs/index.md) for details. +See [the docs](https://lonnieezell.github.io/myth-collection/) for details. diff --git a/docs/assets/github-dark-dimmed.css b/docs/assets/github-dark-dimmed.css new file mode 100644 index 0000000..e702177 --- /dev/null +++ b/docs/assets/github-dark-dimmed.css @@ -0,0 +1,15 @@ +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: GitHub Dark Dimmed + Description: Dark dimmed theme as seen on github.com + Author: github.com + Maintainer: @Hirse + Updated: 2021-05-15 + Modified: 2022:12:27 by @michalsn + + Colors taken from GitHub's CSS +*/.hljs{color:#adbac7 !important;background-color:#22272e !important}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#f47067}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#dcbdfb}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#6cb6ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#96d0ff}.hljs-built_in,.hljs-symbol{color:#f69d50}.hljs-code,.hljs-comment,.hljs-formula{color:#768390}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#8ddb8c}.hljs-subst{color:#adbac7}.hljs-section{color:#316dca;font-weight:700}.hljs-bullet{color:#eac55f}.hljs-emphasis{color:#adbac7;font-style:italic}.hljs-strong{color:#adbac7;font-weight:700}.hljs-addition{color:#b4f1b4;background-color:#1b4721}.hljs-deletion{color:#ffd8d3;background-color:#78191b} + +[data-md-color-scheme="default"] { + --md-default-fg-color--lightest: #575757; + --md-default-fg-color--light: #959595; +} diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..b8febbe --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,45 @@ +site_name: Myth:collection +site_description: Documentation for a Collection library for PHP projects. + +theme: + name: material + features: + - navigation.sections + palette: + scheme: slate + primary: deep-purple + # Palette toggle for light mode + - scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + + # Palette toggle for dark mode + - scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to light mode + # highlight_js: true + # hljs_style: github_dark + # hljs_languages: + # - php + +extra: + homepage: https://lonnieezell.github.io/myth-collection + + social: + - icon: fontawesome/brands/github + link: https://github.com/lonnieezell/myth-collection + name: GitHub + +repo_url: https://github.com/lonnieezell/myth-collection +edit_uri: edit/develop/docs/ + +extra_css: + - assets/github-dark-dimmed.css + +extra_javascript: + - https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/highlight.min.js + +nav: + - Home: index.md