Skip to content

Commit

Permalink
Merge branch 'release/v1.3.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
mgourlay64 committed Jul 30, 2024
2 parents e3f2531 + 154b466 commit 5c0fb6f
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 119 deletions.
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# userguide v1.3.10
# userguide v1.3.11

## Deployment

!!!note
The following steps will deploy the userguide in local mode. It means that you will use the *light version* with only english language and no pdf export.

1. Clone the repo on the VPS
`git clone https://github.com/broodminder/userguide /mellisphera/production/userguide`

Expand All @@ -19,17 +22,26 @@ To manage different librairies version between *userguide*, *hiveminder*, *flowm
3. Install all packages
`pip install -r requirements.txt`

4. Start the server
If you only want to work on local, you can use the following command
`mkdocs serve`
4. Create .env file and replace variables
`cp .env.example .env`

But if you want to start the server with an apache2 configuration, you need to use the **build.sh** file which will build the documentation on copy it on the following folder `/var/www/html/doc`.
In the [.env](.env) file, replace the variable **USERNAME** by your local username from your machine.

`sudo ./build.sh`
5. Export your environment

`export $(grep -v '^#' .env | xargs -0)`

6. Start the server

4. Verify your site
`mkdocs serve`

7. Verify your site
On localhost:3000 if you use local starter or on the DNS you choose on your apache2 configuration.

!!!note
But if you want to start the server with an apache2 configuration, you need to use the **build.sh** file which will build the documentation on copy it on the following folder `/var/www/html/doc`.

`sudo ./build.sh`

## Configuration file mkdocs.yml
This file allows for multiple options and configuration.
Expand Down
6 changes: 0 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#!/bin/bash
# docker run -d -p 8000:8000 --name doc -v /mellisphera/test/userguide/fr/:/docs squidfunk/mkdocs-material
# docker container exec -ti doc mkdocs build --clean
# rm -Rrf /var/www/html/doc/*
# cp -Rr /mellisphera/prod/userguide/fr/site/* /var/www/html/doc/
# sudo docker container rm -f doc

# This file shall be saved in VisualStudio Code with an LF end of line sequence

export $(grep -v '^#' .env | xargs -0)
Expand Down
Binary file added docs/assets/images/flags/en.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/assets/javascripts/extra.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Change language
var languageElement = document.querySelector('.md-select svg');
var lang = window.location.pathname.split('/')[1];
if (lang == '' || lang.length > 2) {
lang = 'en';
}

// Update icon
languageElement.outerHTML = '<img src="/assets/images/flags/' + lang + '.jpg" width="20" height="20">'
1 change: 1 addition & 0 deletions docs/overrides/templates/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@
relocateElementBySelector('.md-search', '#search-form');

window.addEventListener("resize", function() {relocateElementBySelector('.md-search', '#search-form');});

</script>
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ extra:
extra_css:
- assets/css/extra.css

extra_javascript:
- assets/javascripts/extra.js

markdown_extensions:
- admonition
- attr_list
Expand Down
105 changes: 0 additions & 105 deletions mkdocs_test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion userguide_utilities

0 comments on commit 5c0fb6f

Please sign in to comment.