Files
pycom-documentation/README.md
Emmanuel Florent 48e3a22c9e initial commit
2019-06-17 14:24:53 +02:00

44 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# local visualization
.md files are in the content folder, the theme forlder contains the theme.
install Hugo and run it on the current directory.
```
brew install hugo
hugo serve
```
The file config.toml contains the global .toml
# First generation of publish branch
Some commands that have been used for building:
- ```
# it clone gh-pages in ./tmp/ and appy all .md files
./reclone.sh
# generate toc, title, redirects
python3 migration.py
# apply this changes to remove remaining not needed slashes protections
rpl -R '\)' ')' *
rpl -R '(' '(' *
# use carrefully but there should be not .html in content
# find "./content/" -name "*.html" -exec rm {} \;
# then finally fix link self to images
rpl -R "gitbook/assets/" "gitbook/assets/" *
rpl -R "../gitbook/assets" "/gitbook/assets" content
rpl -R "..//gitbook/assets" "/gitbook/assets" content
rpl -R "" "'" content
rpl -R "✔" "✔" content
rpl -R "(../" "(/"
# get the images in static
cp tmp/pydocs/gitbook/assets/* static/gitbook/assets/
```
# detect broken links
```
wget -o 404.txt -r --spider http://localhost:1313
cat ~/output.txt | grep -B 7 404 | grep "\-\-20"
```