Skip to content

Commit

Permalink
Adding basic mkdocs files
Browse files Browse the repository at this point in the history
  • Loading branch information
fedejaure committed Sep 21, 2024
1 parent c69fa4e commit 328c825
Show file tree
Hide file tree
Showing 13 changed files with 643 additions and 40 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ exclude_paths:
- .cache/
- ~/.cache/ansible-lint/
- ~/.cache/ansible-compat/
- mkdocs.yml
warn_list:
- galaxy[version-incorrect]
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repos:
- id: check-toml
- id: check-json
- id: check-yaml
args: ['--unsafe']
- id: debug-statements
- id: check-merge-conflict
- id: pretty-format-json
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
- Docs site.

- MacOS Tools/Packages:
* Ubuntu Nerd Font.
* Ubuntu Mono Nerd Font.
Expand Down
3 changes: 1 addition & 2 deletions LICENSE.rst → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

MIT License
===========
# MIT License

Copyright (c) 2022, Federico Jaureguialzo

Expand Down
61 changes: 45 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Development Setup

<div align="center">
<div markdown="span" align="center">

[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/fedejaure/dev-setup?logo=github)](https://github.com/fedejaure/dev-setup/releases)
[![Tests](https://github.com/fedejaure/dev-setup/workflows/tests/badge.svg)](https://github.com/fedejaure/dev-setup/actions?workflow=tests)
Expand Down Expand Up @@ -78,9 +78,9 @@ My own Ansible collection for development setup (use by your own risk).
* [pipenv](https://pipenv.pypa.io/en/latest/)
* [cookiecutter](https://github.com/cookiecutter/cookiecutter)
* [poetry](https://python-poetry.org/) with:
* [Poetry Plugin: Export](https://github.com/python-poetry/poetry-plugin-export)
- [Poetry Plugin: Export](https://github.com/python-poetry/poetry-plugin-export)
* [nox](https://nox.thea.codes/en/stable/) with:
* [nox-poetry](https://nox-poetry.readthedocs.io/en/stable/)
- [nox-poetry](https://nox-poetry.readthedocs.io/en/stable/)

#### Other installed Tools

Expand All @@ -100,10 +100,14 @@ My own Ansible collection for development setup (use by your own risk).

Create a temporary virtualenv, activate the virtualenv and install ansible:

```shell session
<!-- termynal -->

```console
$ /usr/bin/python3 -m venv .venv
$ . .venv/bin/activate
(.venv)$ pip3 install ansible
---> 100%
Installed
```

4. Install ansible requirements `ansible-galaxy install -r requirements.yml`.
Expand All @@ -112,11 +116,11 @@ My own Ansible collection for development setup (use by your own risk).

6. Run `ansible-playbook playbooks/main.yml --ask-become-pass -i inventory`.

> Note: You need to agree to Xcode's license.
>
> ```shell session
> $ sudo xcodebuild -license
> ```
> Note: You need to agree to Xcode's license.
>
> ```console
> $ sudo xcodebuild -license
> ```

### Configuring a remote Mac

Expand All @@ -126,7 +130,9 @@ My own Ansible collection for development setup (use by your own risk).

2. Install dependencies:

```shell session
<!-- termynal -->

```console
$ poetry install --no-root
Using python3.10 (3.10.8)
Creating virtualenv .venv
Expand All @@ -139,7 +145,9 @@ My own Ansible collection for development setup (use by your own risk).

3. Activate the virtual environment:

```shell session
<!-- termynal -->

```console
$ poetry shell
Using python3.10 (3.10.8)
Spawning shell within .venv
Expand All @@ -148,8 +156,15 @@ My own Ansible collection for development setup (use by your own risk).

4. Install required Ansible roles:

```shell session
<!-- termynal -->

```console
(dev-setup)$ inv galaxy-install
Starting galaxy role install process
...
Starting galaxy collection install process
...
fedejaure.dev_setup was installed successfully
```

5. Configure the `inventory` file:
Expand Down Expand Up @@ -178,20 +193,31 @@ My own Ansible collection for development setup (use by your own risk).
>
> > You can also enable remote login on the command line:
> >
> > ```shell session
> > ```console
> > $ sudo systemsetup -setremotelogin on
> > ```
>
> > Note: You need to agree to Xcode's license.
> >
> > ```shell session
> > ```console
> > $ sudo xcodebuild -license
> > ```

6. Run the playbook:

```shell session
<!-- termynal -->

```console
(dev-setup)$ inv playbook --ask-pass --ask-become-pass
SSH password:
BECOME password[defaults to SSH password]:

PLAY [Mac OSX Playbook] ***************************************************

TASK [Gathering Facts] ****************************************************
ok: [127.0.0.1]

...
```

7. Enjoy!
Expand Down Expand Up @@ -278,13 +304,16 @@ Development

To display available tasks run:

```shell session
<!-- termynal -->

```console
(dev-setup)$ inv --list
Available tasks:

ansible-lint Run ansible linter.
clean Run all clean sub-tasks.
clean-python Clean up python file artifacts.
docs Build documentation.
format Format code.
galaxy-install Install ansible-galaxy requirements.
hooks Run pre-commit hooks.
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Welcome to dev-setup

My own Ansible collection for development setup (use by your own risk).
1 change: 1 addition & 0 deletions docs/license.md
1 change: 1 addition & 0 deletions docs/readme.md
134 changes: 134 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
# Project information
site_name: Development Setup
site_url: https://fedejaure.github.io/dev-setup/
site_author: Federico Jaureguialzo
site_description: >-
My own Ansible collection for development setup.
# Repository
repo_name: fedejaure/dev-setup
repo_url: https://github.com/fedejaure/dev-setup

# Copyright
copyright: "Copyright &copy; 2020 - <script>document.write(new Date().getFullYear())</script> Federico Jaureguialzo"

# Configuration
theme:
name: material
# custom_dir: docs/overrides
features:
- announce.dismiss
# - content.action.edit
# - content.action.view
- content.code.annotate
- content.code.copy
# - content.code.select
# - content.footnote.tooltips
# - content.tabs.link
- content.tooltips
# - header.autohide
# - navigation.expand
- navigation.footer
- navigation.indexes
# - navigation.instant
# - navigation.instant.prefetch
# - navigation.instant.progress
# - navigation.prune
- navigation.sections
- navigation.tabs
- navigation.tabs.sticky
- navigation.top
- navigation.tracking
- search.highlight
- search.share
- search.suggest
- toc.follow
# - toc.integrate
palette:
- media: "(prefers-color-scheme)"
toggle:
icon: material/link
name: Switch to light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: brown
accent: brown
toggle:
icon: material/toggle-switch
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: brown
accent: black
toggle:
icon: material/toggle-switch-off
name: Switch to system preference
font:
text: Roboto
code: Roboto Mono
icon:
repo: fontawesome/brands/github-alt
# logo: img/icon-white.svg
# favicon: assets/favicon.png
# icon:
# logo: logo

# Plugins
plugins:
- search:
- minify:
minify_html: true
- termynal:
prompt_literal_start:
- "$"
- "(.venv)$"
- "(dev-setup)$"

# Hooks
# hooks:

# Additional configuration
extra:
analytics:
provider: google
property: !ENV GOOGLE_ANALYTICS_KEY
social:
- icon: fontawesome/brands/github
link: https://github.com/fedejaure

# Extensions
markdown_extensions:
- abbr
- admonition
- attr_list
- def_list
- footnotes
- md_in_html
- toc:
permalink: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.details
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.mark
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.tilde


# Page tree
nav:
- Home: index.md
- Getting started:
- Overview: readme.md
- License: license.md
- Changelog: changelog.md
Loading

0 comments on commit 328c825

Please sign in to comment.