Skip to content
Snippets Groups Projects
Commit efa3f28a authored by Alexandre Caldato's avatar Alexandre Caldato
Browse files

added fake pages to try out markdown features

parent e35cffc1
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ verify_ssl = true
name = "pypi"
[packages]
mkdocs-dsfr = "0.3.1"
mkdocs-dsfr = "0.4.0"
mkdocs = "*"
[dev-packages]
......
{
"_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": {
......
## 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`.
# 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: ![Markdown Logo](https://markdown-here.com/img/icon256.png)
###### 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
## 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
{% 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 %}
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)
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment