Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

move to mkdocs #2919

Merged
merged 16 commits into from
Mar 27, 2020
Merged

move to mkdocs #2919

merged 16 commits into from
Mar 27, 2020

Conversation

dholbach
Copy link
Member

First cut at moving docs over to mkdocs for flux too (follow up from fluxcd/helm-operator#332)

@dholbach dholbach requested review from squaremo, stefanprodan and hiddeco and removed request for squaremo March 17, 2020 08:16
@dholbach
Copy link
Member Author

To review, run:

pip3 install -r docs/requirements.txt
mkdocs serve

@dholbach
Copy link
Member Author

The navbar on the left is something we can still tweak, and we might want to take a look at the currently quite empty index.md files.

@stefanprodan
Copy link
Member

Can we have a preview link like you did for helm-op?

@dholbach
Copy link
Member Author

Can do, it'll be manual though, as I don't think I can set up webhooks easily.

@dholbach
Copy link
Member Author

@dholbach dholbach changed the title WIP: move to mkdocs move to mkdocs Mar 17, 2020
@dholbach dholbach marked this pull request as ready for review March 17, 2020 08:39
@dholbach dholbach self-assigned this Mar 17, 2020
@dholbach dholbach added the docs Issue or PR relates to documentation label Mar 17, 2020
docs/index.md Outdated Show resolved Hide resolved
@dholbach
Copy link
Member Author

The landing page (docs/index.md) looks very boring right now as there's no "toctree: depth 2" kind of thing - maybe there's some plugin to do this? Maybe we should symlink the top-level README.md?

@stefanprodan
Copy link
Member

@dholbach I think the index should contain the diagram and the feature list (like we did for helm-op). I'll make the feature list, please add the diagram for now.

@dholbach
Copy link
Member Author

I think we're mostly good to go now.

@dholbach
Copy link
Member Author

Current URLs for latest are:

https://docs.fluxcd.io/en/latest/
https://docs.fluxcd.io/en/latest/_static/css/theme.css
https://docs.fluxcd.io/en/latest/_static/pygments.css
https://docs.fluxcd.io/en/latest/_static/custom.css
https://docs.fluxcd.io/en/latest/genindex.html
https://docs.fluxcd.io/en/latest/search.html
https://docs.fluxcd.io/en/latest/introduction.html
https://docs.fluxcd.io/en/latest/requirements.html
https://docs.fluxcd.io/en/latest/get-started/index.html
https://docs.fluxcd.io/en/latest/references/index.html
https://docs.fluxcd.io/en/latest/guides/index.html
https://docs.fluxcd.io/en/latest/tutorials/index.html
https://docs.fluxcd.io/en/latest/faq.html
https://docs.fluxcd.io/en/latest/troubleshooting.html
https://docs.fluxcd.io/en/latest/contributing/index.html
https://docs.fluxcd.io/en/latest/references/blueprint.html
https://docs.fluxcd.io/en/latest/references/daemon.html
https://docs.fluxcd.io/en/latest/references/fluxctl.html
https://docs.fluxcd.io/en/latest/references/fluxyaml-config-files.html
https://docs.fluxcd.io/en/latest/references/garbagecollection.html
https://docs.fluxcd.io/en/latest/references/git-gpg.html
https://docs.fluxcd.io/en/latest/references/automated-image-update.html
https://docs.fluxcd.io/en/latest/references/helm-operator-integration.html
https://docs.fluxcd.io/en/latest/references/monitoring.html
https://docs.fluxcd.io/en/latest/guides/provide-own-ssh-key.html
https://docs.fluxcd.io/en/latest/guides/use-git-https.html
https://docs.fluxcd.io/en/latest/guides/use-private-git-host.html
https://docs.fluxcd.io/en/latest/guides/upgrading-to-1.0.html
https://docs.fluxcd.io/en/latest/tutorials/get-started.html
https://docs.fluxcd.io/en/latest/tutorials/get-started-helm.html
https://docs.fluxcd.io/en/latest/tutorials/get-started-kustomize.html
https://docs.fluxcd.io/en/latest/tutorials/driving-flux.html
https://docs.fluxcd.io/en/latest/contributing/get-started-developing.html
https://docs.fluxcd.io/en/latest/contributing/building.html
https://docs.fluxcd.io/en/latest/index.html

I'm wondering if we should add redirects for them all?

@hiddeco
Copy link
Member

hiddeco commented Mar 17, 2020

To prevent the projects vs organization mix-up:

diff --git a/mkdocs.yml b/mkdocs.yml
index fc3b535d..640d52a6 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,6 +1,6 @@
-site_name: Flux CD
+site_name: Flux
 # site_description:
-site_author: Flux CD Project
+site_author: Flux contributors
 site_url: https://docs.fluxcd.io/

 # Repository

Roboto Mono is already the default font for code, I also think a slightly smaller navigation title and logo look better:

diff --git a/docs/_static/custom.css b/docs/_static/custom.css
index fa1bff16..0c7edb7a 100644
--- a/docs/_static/custom.css
+++ b/docs/_static/custom.css
@@ -1,29 +1,24 @@
 @import url("https://fonts.googleapis.com/css?family=Montserrat&display=swap");
-@import url("https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap");

 body {
   font-family: "Montserrat", sans-serif;
 }

-.rst-content pre.literal-block, .rst-content div[class^="highlight"] pre, .rst-content .linenodiv pre {
-  font-family: "Roboto Mono", monospace;
-}
-
-code {
-  font-family: "Roboto Mono", monospace;
-}
-
 .md-logo {
-    width: 54px;
-    height: 54px;
+    width: 40px;
+    height: 40px;
     padding-bottom: 2px;
     padding-top: 2px;
 }
 .md-logo img {
-    width: 44px;
-    height: 44px;
+    width: 40px;
+    height: 40px;
 }

-.md-header,.md-footer-nav {
+.md-header, .md-footer-nav {
     background-image: linear-gradient(45deg, rgb(0, 150, 225) 0%, rgb(27, 141, 226) 24%, rgb(42, 125, 227) 53%, rgb(53, 112, 227) 78%, rgb(53, 112, 227) 100%);
 }
+
+.md-header-nav__title {
+    font-size: .85rem;
+}

@dholbach
Copy link
Member Author

nice one, thanks @hiddeco

@dholbach
Copy link
Member Author

Apparently we can't use mkdocs-redirects for the above.

WARNING -  redirects plugin: 'introduction.html' is not a valid markdown file! 

@dholbach
Copy link
Member Author

So yeah, for now this is all we can do. Please review and let me know when you want to land this. It'll require changing one setting from "sphinx" to "mkdocs" in the RTD UI.

mkdocs.yml Show resolved Hide resolved
mkdocs.yml Outdated Show resolved Hide resolved
docs/references/fluxyaml-config-files.md Outdated Show resolved Hide resolved
@dholbach
Copy link
Member Author

Do we want something like this https://github.com/weaveworks/wksctl/pull/153/files#diff-b67911656ef5d18c4ae36cb6741b7965L150-R152? The wksctl team wanted it.

mkdocs.yml Outdated Show resolved Hide resolved
mkdocs.yml Outdated Show resolved Hide resolved
Daniel Holbach and others added 2 commits March 27, 2020 10:49
Co-Authored-By: Hidde Beydals <hiddeco@users.noreply.github.com>
@hiddeco
Copy link
Member

hiddeco commented Mar 27, 2020

Awesome work, thanks a bunch @dholbach

@dholbach dholbach merged commit 61be22b into master Mar 27, 2020
@dholbach dholbach deleted the move-to-mkdocs branch March 27, 2020 10:17
@hiddeco hiddeco mentioned this pull request Mar 27, 2020
@dholbach dholbach added this to the 1.19.0 milestone Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs Issue or PR relates to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants