How to make fabacademy2024 kannai site¶
yuichi@MacBookAir-M2 repos % git clone git@gitlab.fabcloud.org:academany/fabacademy/2024/labs/kannai/site.git
Cloning into 'site'...
warning: You appear to have cloned an empty repository.
yuichi@MacBookAir-M2 repos % ls
site
yuichi@MacBookAir-M2 repos % mv site fa2024_kannai_site
yuichi@MacBookAir-M2 repos % ls
fa2024_kannai_site
yuichi@MacBookAir-M2 repos % cd fa2024_kannai_site
yuichi@MacBookAir-M2 fa2024_kannai_site % ls
yuichi@MacBookAir-M2 fa2024_kannai_site % ls -la
total 0
drwxr-xr-x 3 yuichi staff 96 1 22 21:43 .
drwxr-xr-x 11 yuichi staff 352 1 22 21:44 ..
drwxr-xr-x 9 yuichi staff 288 1 22 21:43 .git
yuichi@MacBookAir-M2 fa2024_kannai_site % git switch --create main
Switched to a new branch 'main'
yuichi@MacBookAir-M2 fa2024_kannai_site % touch README.md
yuichi@MacBookAir-M2 fa2024_kannai_site % git add README.md
yuichi@MacBookAir-M2 fa2024_kannai_site % git commit -m "add README"
yuichi@MacBookAir-M2 fa2024_kannai_site % git push --set-upstream origin main
mkdocs
yuichi@MacBookAir-M2 fa2024_kannai_site % cd ../
yuichi@MacBookAir-M2 repos % mkdocs new fa2024_kannai_site
INFO - Writing config file: fa2024_kannai_site/mkdocs.yml
INFO - Writing initial docs: fa2024_kannai_site/docs/index.md
yuichi@MacBookAir-M2 repos % ls
fa2024_kannai_site
yuichi@MacBookAir-M2 repos % cd fa2024_kannai_site
yuichi@MacBookAir-M2 fa2024_kannai_site % ls -la
total 32
drwxr-xr-x 7 yuichi staff 224 1 22 22:10 .
drwxr-xr-x 11 yuichi staff 352 1 22 21:44 ..
-rw-r--r--@ 1 yuichi staff 6148 1 22 22:11 .DS_Store
drwxr-xr-x 14 yuichi staff 448 1 22 21:48 .git
-rw-r--r-- 1 yuichi staff 43 1 22 21:48 README.md
drwxr-xr-x 3 yuichi staff 96 1 22 22:10 docs
-rw-r--r-- 1 yuichi staff 19 1 22 22:10 mkdocs.yml
image: python:3.9-slim
before_script:
# install Git for the mkdocs revision plugin
- time apt update && apt-get install -y git
# Install mkdocs and theme
- time pip install -r requirements.txt
test:
stage: test
script:
- time mkdocs build --site-dir test
artifacts:
paths:
- test
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
pages:
stage: deploy
variables:
ENABLED_GIT_REVISION_DATE: "true"
GIT_DEPTH: 1000
script:
- time mkdocs build --site-dir public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
mkdocs.yml
# Replace the text below to customize your site
site_name: FabLab Kannai - Fab Academy 2024
site_description: Fab Academy documentation site for FabLab Kannai
site_author: Yuichi TAMIYA
copyright: Copyright 2024 Yuichi TAMIYA - Creative Commons Attribution Non Commercial
site_url: https://academany.fabcloud.io/fabacademy/2024/labs/kannai/site/
extra_css:
- stylesheets/extra.css
theme:
name: material
#palette:
# try other colors https://squidfunk.github.io/mkdocs-material/getting-started/#primary-colors
#primary: deep
#accent: red
font:
# See available fonts at https://fonts.google.com/
text: Ubuntu
code: Ubuntu Mono
icon:
logo: material/school
favicon: images/favicon.svg
features:
- navigation.tabs
- navigation.instant
# - navigation.sections
plugins:
- search
- git-revision-date-localized:
fallback_to_build_date: true
# Read more: https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/options/#enabled
enabled: !ENV [ENABLED_GIT_REVISION_DATE, False]
# - mkdocs-video
markdown_extensions:
- extra
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- smarty
- admonition
- codehilite:
guess_lang: false
- toc:
permalink: true
# - attr_list #mkdocs-video
requirements.txt
# Documentation static site generator
mkdocs ~= 1.2.3
mkdocs-git-revision-date-localized-plugin ~= 0.11.0
# Add your custom theme if not inside a theme_dir
# (https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes)
mkdocs-material ~= 8.0
> pip install -r requirements.txt
Last update:
January 28, 2024