diff --git a/Pipfile b/Pipfile index 5c2d448b00c1ec7a752c79f4e83a27af31d7121e..95d63eb8a66e559833563c789b8cc9b866269d39 100644 --- a/Pipfile +++ b/Pipfile @@ -4,7 +4,7 @@ verify_ssl = true name = "pypi" [packages] -mkdocs-dsfr = "0.3.1" +mkdocs-dsfr = "0.4.0" mkdocs = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 6bd53560b58469a3ca5625d3d543729581ac8836..071d9c4131432703534162027a76888ae2eb2b7f 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "27a7f0abbe78e133e042598d9eb426421a5d49f3813ffb430284670f4632cea5" + "sha256": "419ddafbe635e66f0c43faa5f5b9501bc17395a77d91b5b0a1f26b43c02cc99a" }, "pipfile-spec": 6, "requires": { @@ -129,11 +129,11 @@ }, "mkdocs-dsfr": { "hashes": [ - "sha256:1379cbead25d1423fe2275b0e287b6c64322be76a73ac06ba2f5fce74744de0b", - "sha256:ff58532bfcfc258360c05aa81259e6113a64f3b8d5b8017a6c0fffe6b48bb369" + "sha256:8930c1ebe9da8bb2b728efdb90d39915dfd86bf269cb9d75fe8b3ec983453237", + "sha256:b3d50e78650f92ac5373b6f0dff49e57b6180546e653de961d83f066f353aff7" ], "index": "pypi", - "version": "==0.3.0" + "version": "==0.4.0" }, "packaging": { "hashes": [ @@ -148,7 +148,7 @@ "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==2.8.2" }, "pyyaml": { @@ -210,7 +210,7 @@ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.16.0" }, "watchdog": { diff --git a/docs/communication.md b/docs/communication.md new file mode 100644 index 0000000000000000000000000000000000000000..8658ea12dafc16d168ed1d9f022215689ad9cf08 --- /dev/null +++ b/docs/communication.md @@ -0,0 +1,24 @@ +## Text Formatting, Blockquotes, Horizontal Line + +**This is bold text** + +__This is also bold text__ + +*This is italic text* + +_This is also italic text_ + +***This is bold and italic text*** + +___This is also bold and italic text___ + +> This is a blockquote. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel lorem vel nibh lacinia maximus nec quis mauris. + +> This is another blockquote. Duis accumsan nunc in ligula cursus, in posuere risus maximus. + +--- + +Horizontal line above. + +Text with `inline code`. + diff --git a/docs/index.md b/docs/index.md index ed196f9309b5b9a9e8f291fc8fd38218062999b7..1ee522962f5d39897269f0c349abcb2998f28099 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,22 +1,40 @@ -# Welcome to MkDocs +## Headers, Lists, Links, and Images -For full documentation visit [mkdocs.org](https://www.mkdocs.org). +# Header 1 -## Commands +Lorem ipsum dolor sit amet, consectetur adipiscing elit. -* `mkdocs new [dir-name]` - Create a new project. -* `mkdocs serve` - Start the live-reloading docs server. -* `mkdocs build` - Build the documentation site. -* `mkdocs -h` - Print help message and exit. +## Header 2 -## Table Example +* Curabitur aliquam lacus vitae est aliquet, in volutpat lorem cursus. +* Aenean cursus mauris vel diam feugiat rutrum. -| Day | Breakfast | Lunch | Dinner | -|----------|-----------------------------|------------------------|------------------------| -| Monday | Avocado Toast & Coffee | Grilled Chicken Salad | Spaghetti Carbonara | -| Tuesday | Greek Yogurt & Berries | Tuna Sandwich | Grilled Salmon | -| Wednesday| Oatmeal & Green Tea | Chicken Caesar Wrap | Stir-Fry Vegetables | -| Thursday | Scrambled Eggs & Toast | Vegetable Soup | Beef Stroganoff | -| Friday | Pancakes & Orange Juice | BLT Sandwich | Margherita Pizza | -| Saturday | French Toast & Smoothie | Chicken Quesadilla | BBQ Ribs | -| Sunday | Bagel & Cream Cheese | Steak Salad | Roasted Chicken & Veggies | +### Header 3 + +1. Suspendisse sem lorem +2. Vestibulum ante ipsum primis +3. Fusce pulvinar semper magna + +#### Header 4 + +This is a link to [Google](https://www.google.com) + +##### Header 5 + +This is an inline image:  + +###### Header 6 + +* An unordered list: + * First item + * Second item + * Sub-item 1 + * Sub-item 2 +* Third item + +A list within a list: +1. First item +2. Second item + 1. Sub-item 1 + 2. Sub-item 2 +3. Third item diff --git a/docs/navigation.md b/docs/navigation.md new file mode 100644 index 0000000000000000000000000000000000000000..e19b8f8ddb642e71223dfebd70a959e05f1b613e --- /dev/null +++ b/docs/navigation.md @@ -0,0 +1,50 @@ +## Code blocks, Tables, Strikethrough, Task Lists + +# Code Blocks + +You can use triple backticks to create a code block. You can also specify the language for syntax highlighting. + +Here is an example using Python: + +```python +def hello_world(): + print("Hello, world!") + +hello_world() +``` + +# Tables + +Creating tables in Markdown requires using the pipe symbol (|) to separate columns and dashes (-) to separate headers from rows. + +Here's a simple table: + +| Name | Age | Country | +|-----------|-----|-----------| +| John Doe | 28 | USA | +| Jane Doe | 32 | Canada | +| Jim Smith | 45 | Australia | + +# Strikethrough + +The strikethrough effect can be achieved by wrapping your text with two tilde (~~) symbols. + +Like this: ~~Strikethrough text~~ + +# Task Lists + +Task lists allow you to create a checklist of items with checkboxes. + +Uncompleted tasks: +- [ ] Task 1 +- [ ] Task 2 +- [ ] Task 3 + +Completed task: +- [x] Task 1 + +Nested task list: +- [ ] Task 1 + - [ ] Subtask 1.1 + - [x] Subtask 1.2 +- [x] Task 2 diff --git a/dsfr_theme/main.html b/dsfr_theme/main.html index 0fe0ed09d8d0a87d853f06fccc7bc3f9b6b9729b..94d9808cc760156cb7ab46e326c0267f3406125e 100644 --- a/dsfr_theme/main.html +++ b/dsfr_theme/main.html @@ -1,12 +1 @@ {% extends "base.html" %} - -{% block footer %} -<div class="commit-info"> - <ul> - <li>Branch: {{ config.extra.commit_info.branch }}</li> - <li>Message: {{ config.extra.commit_info.message }}</li> - <li>Author: {{ config.extra.commit_info.author }}</li> - <li>Date: {{ config.extra.commit_info.date }}</li> - </ul> -</div> -{% endblock %} diff --git a/generate_commit_info.py b/generate_commit_info.py deleted file mode 100644 index 140d8d1a4db2b89373b00a6b8072d8932ccb74e7..0000000000000000000000000000000000000000 --- a/generate_commit_info.py +++ /dev/null @@ -1,29 +0,0 @@ -import yaml -from git import Repo - - -def get_git_commit_info(repo_path): - repo = Repo(repo_path) - head_commit = repo.head.commit - branch_name = repo.active_branch.name - return { - 'branch': branch_name, - 'message': head_commit.message, - 'author': head_commit.author.name, - 'date': head_commit.committed_datetime.strftime("%Y-%m-%d %H:%M:%S") - } - - -def write_commit_info_to_config(commit_info, config_file): - with open(config_file, 'r+') as file: - config = yaml.safe_load(file) - config['extra']['commit_info'] = commit_info - file.seek(0) - yaml.dump(config, file) - - -if __name__ == "__main__": - repo_path = '.' - config_file = 'mkdocs.yml' - commit_info = get_git_commit_info(repo_path) - write_commit_info_to_config(commit_info, config_file) diff --git a/mkdocs.yml b/mkdocs.yml index 72dbe49064a4c8b3acc58ef5c494ad050c455d12..24c29a5135f09987c453397c63253648ad9b10e9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,14 +1,32 @@ -extra: - commit_info: - author: alexandre.caldato - branch: main - date: '2023-06-01 19:50:17' - message: 'add script to generate commit md file' + extra_css: -- css/extra.css + - css/extra.css + nav: -- Home: index.md -- Latest Commit: commit_info.md -site_name: My Docs + - Accueil: index.md + - Communication: communication.md + - Navigation: navigation.md + +site_name: Portail Forge + theme: name: dsfr + menulateral: false + no_search: true + intitule: "Ministères <br>Transition écologique <br>Cohésion des territoires <br> mer" + header: + titre: "Portail Forge - DNUM/MSP/DAM" + sous_titre: "Liens vers les outils et informations autour de la livraison continue !" + no_search: true + footer: + description: "Ce site est géré par le Département Architecture et Méthodes" + links: + - name: legifrance.gouv.fr + url: https://legifrance.gouv.fr + - name: gouvernement.fr + url: https://gouvernement.fr + - name: service-public.fr + url: https://service-public.fr + - name: data.gouv.fr + url: https://data.gouv.fr +