Closed vinomaster closed 3 years ago
Thanks for the feedback, here are my thoughts:
Styling It seems very vanilla... with small logo. The Linux Foundation gets for visibility than ToIP. Can we improve the theme? Minimally can we get to this level of theme/logo?
We can adjust the styling, for sure. I analyzed https://trustoverip.org/ and tried to provide a styling which is as close as possible to your CI, while being easy on the eyes. I settled with your brand colors for links, fonts (it was Roboto after all, which is the default of Material for MkDocs) and a light appearance in general. We can increase the height of the header, but it will not collapse without any additional effort when scrolling down, so it will remain at this size.
Can we move /doc/assets to /theme/toip thereby allowing for flexibility in YAML?
What do you mean by flexibility in YAML? In the end, the assets (JS, CSS, logo) need to be under docs_dir
, because that's where MkDocs expects them to be when building the site.
We want to ensure flexibly in configuration. For example what about these YAML file options and how do we make sure the Makefile is not impacted? The make should not assume the site_dir or docs_dir.
Passing parameters to make
is only possible via environment variables - it's not possible to pass arguments otherwise. Thus, we'd need to add env variables with reasonable defaults. However, that would either mean we need to switch to a two-pass Makefile, i.e. second expansion, as targets would be dynamic, or move to phony targets, only, thus losing the upside of using a Makefile, that is dependency tracking. Another idea would be to parse the data directly from the mkdocs.yml
, by using yq
or something similar. I haven't tried yq
yet (as I wanted to keep dependencies as small as possible), but unfortunately, some YAML parsers have problems parsing mkdocs.yml
because of the dynamic !!python
values.
Update repo to be a Template Repo. In other words, creation of a new repo should be pushing a GitHub button not following instructions... we need to keep this simple.
Unfortunately, as a maintainer (and not an admin) I don't have the rights to do this. I cannot change this repository to a template repository, that's something that has to be done by an admin. The instructions are meant to be for when you check out the repository and run it locally.
Add make help like this example which parses the Makefile header.
Check, we can do that.
Preparing the local environment needs to be simplified via a make command. See example here. It is ok if you want to assume MacOS as target env
It wasn't clear to me that we can assume macOS. I'll add the command from your repository.
Do not get the (venv) prompt -- maybe b/c my bash_profile overirides?
That could be a shell/local difference. Can you execute the commands successfully? In that case it will work nonetheless.
Trivial -- fix "your" spelling in readme.
Will do.
Did not work ... result was empty index.md
Did you add the files you created to the nav
entry in mkdocs.yml
? An excerpt from the README:
If you want to create a combined Markdown file, this repository contains some scripts which will preprocess and concatenate all Markdown files in the order specified in mkdocs.yml. The scripts will ensure that internal links to pages and anchors are correct. The combined file can be created with:
The approach of using find docs -name "*.md" does not allow for the authors to convey ordering of files. Why not simply leverage the nav block in the yaml?
The nav block is leveraged, as noted in the comment above. The find docs...
command is only used to detect changes, so you the target needs to be rebuilt. The actual logic is here:
Where are plugins for this? The make should be extended to generate a PDF in the dist folder via similar pandoc methods or other mkdocs plugins.
As I noted via Slack, I have some questions regarding the PDF, so I did not include it yet.
On the topic of Separation of Theme from Content could we MOVE all Theme content to docs_dir
where default is /docs
/docs
/theme
/assets
/css
/overrides
Then update the YAML accordingly. This way of docs_dir
is set to something other than default and /docs folder is renamed....no impact.
Passing parameters to make is only possible via environment variables.
Lets discuss. I beleive thsi is possible via command line overrides and properly setup Makefiles using variable exporting.
For example:
Makefile:
DOCSDIR?='./docs'
dist/assets: $(DOCSDIR)/assets $(shell find $(DOCSDIR)/assets)
Command Line:
make combine DOCSDIR='/content'
Template Repo Button:
I will handle this change once we close on rest of work. Final Step :-)
When we syncup, we can review the issues with virtualenv .... regardless this approach places a burden on repo user to know how to install dependences on MacOS or Windows.
The goal is to allow an author that is not a developer to simply have an environment that can be used locally whereby they edit markdown files and can instantly see changes to locally running site in a browser.
If we can create a Makefile that hides Docker commands this should be possible using:
make serve
which will
mkdocs serve
This will:
Zoom Call Notes 27-NOV:
extra.title
, otherwise use site_name
)overrides
to docs/theme/overrides
Regarding the spec theme:
Additionally:
nav
structureMakefile
target)Makefile
Spec demo looks good...
two comments: a) Is it possible for the Linux Foundation header to be left justified above left-nav frame?
b) We discussed the expansion of per/page sections in left-nav
1. Title
2. blal
2.1
2.2
3. blah
4. blah
where when Section 2 is in focus the subsections are expanded and then removed when not in focus. So only the current page is expanded. This was to make up for elimination of right table of contents per page nav.
a) Fixed by 65a53cb b) Fixed by d894edf
Both deployed on https://squidfunk.github.io/toip-demo-spec/
Looks Great!
I have created a fork of this repo and have run some tests to get acquainted with the approach.
Styling
It seems very vanilla... with small logo. The Linux Foundation gets for visibility than ToIP. Can we improve the theme? Minimally can we get to this level of theme/logo using this example Logo URL?
Additionally the theme for
specs
needs to look like this example but using our color palette. For example: Table of Contents header background should use one of our blues and the grey left-nav background should use something from our palette.Separation of Theme from Content
Can we move
/doc/assets
to/theme/toip
thereby allowing for flexibility in YAML?Decoupling Make and YAML Files
We want to ensure flexibly in configuration. For example what about these YAML file options and how do we make sure the Makefile is not impacted? The
make
should not assume the site_dir or docs_dir.GitHub Template Repo
Make Help
Add make help like this example which parses the Makefile header.
Setup Step 4
Preparing the local environment needs to be simplified via a
make
command. See example here. It is ok if you want to assume MacOS as target env.Make Setup
Do not get the (venv) prompt -- maybe b/c my bash_profile overirides?
Make Combine
find docs -name "*.md"
does not allow for the authors to convey ordering of files. Why not simply leverage thenav
block in the yaml?PDF Generation
Where are plugins for this? The make should be extended to generate a PDF in the
dist
folder via similar pandoc methods or other mkdocs plugins.