Skip to content

Commit

Permalink
Add site docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell committed Oct 3, 2023
1 parent abce1f0 commit deb2e12
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
15 changes: 15 additions & 0 deletions docs/assets/github-dark-dimmed.css
Original file line number Diff line number Diff line change
@@ -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;
}
45 changes: 45 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]/build/highlight.min.js

nav:
- Home: index.md

3 comments on commit deb2e12

@lonnieezell
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michalsn This is my first time trying to get docs auto-built. Looks like they are being built correctly since the action passes, but I'm not seeing them show up at https://lonnieezell.github.io/myth-collection. Any idea what step I've missed?

thanks!

@michalsn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Go to: Settings > Pages
  • Source should be set to Deploy from branch
  • And Branch should be set to gh-pages and root

@lonnieezell
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, changing the branch is what I missed. Thanks! That got it up and running.

Please sign in to comment.