Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation fixes and improvements #466

Merged
merged 25 commits into from
Mar 4, 2022

Conversation

ukkopahis
Copy link

@ukkopahis ukkopahis commented Dec 18, 2021

One pull request to gather improvements and fixes to the documentation.

Fixes:

  • Dead links corrected
  • Markdown formatting errors. The added newlines are required for mkdocs to correctly process formatting.
  • Container menu-listing to be alphabetically ordered.

Improvements:

  • Pi-hole DNS routing setup and troubleshooting
  • How to update containers with git & docker
  • Influxdb database creation, retention policy changes, sd-card wear-out prevention
  • Home-assistant https reverse proxy and certificate setup using swag to enable google assistant integration
  • How to write docs: mkdocs references and testing locally
  • Wireguard PEERDNS=auto works together with changes to host's resolveconf.conf
  • Add Discord link to Wiki home page

Changes:

  • Add top tabs: IOTstack Wiki, Basic setup, Containers, Developers
    (these were chosen in order to be in a sensible alphabetical order)
  • Update-related pages organized into the "Basic setup/Updates" subtopic, to make the left menu a bit clearer.
  • Files moved to corresponding folders and links updated and redirects from old locations added as not to break existing links on the web.
  • Remove custom anchor links and generate them automatically using the "toc" markdown extension. This fixes the blue coloring of the headings, which especially impacts users selecting the dark theme.

Resolves:

New top tabs look like this (live version):
Screenshot_2022-01-26_02-10-47-doc-improvement

And in dark mode:
Screenshot_2022-01-26_02-08-23-doc-improvement

@ukkopahis ukkopahis force-pushed the doc-improvements branch 2 times, most recently from 9aad1be to 6e63ba8 Compare December 26, 2021 10:10
@ukkopahis ukkopahis mentioned this pull request Jan 15, 2022
@ukkopahis
Copy link
Author

As a convenience, this and most other recent pull-request are available merged in my repository:
https://github.com/ukkopahis/IOTstack/tree/master/

These changes are also updated to the documentation page available at:
https://ukkopahis.github.io/IOTstack/

@ukkopahis ukkopahis changed the title Doc improvements Documentation fixes and improvements Jan 20, 2022
@ukkopahis
Copy link
Author

ukkopahis commented Jan 25, 2022

Some users could benefit from this and I wouldn't have to link them to my fork...
Screenshot_2022-01-25_23-59-55 influxdb-docs-update-needed

@ukkopahis ukkopahis force-pushed the doc-improvements branch 8 times, most recently from 32aa226 to ea93448 Compare January 28, 2022 16:24
ukkopahis and others added 11 commits January 28, 2022 18:41
Using localhost in the url doesn't work, so took me a while to figure
out the correct URL.
* links fixed and changed to relative.
  Absolute links are not supported by mkdocs:

    https://www.mkdocs.org/user-guide/writing-your-docs/#linking-to-pages
Basically contains most changes from:
SensorsIot#338

* Dark and light modes
* Always expand left-navigation folders, improving usability
* Only relative links withing pages are supported:
      https://www.mkdocs.org/user-guide/writing-your-docs/#linking-to-pages
  As an additional benefit, when running:
      $ mkdocs serve
  it will issues a warnings for invalid relative links
* Add top tabs: Basic setup, Containers, Developers
  * these were chosen in order to be in a sensible alphabetical order
  * files moved to corresponding folders and links updated
* Add redirect from old file locations
* "Basic setup" has a lot of items. Update related pages organized
  into the "Updates" subtopic, to make it a bit more clear.
Remove custom anchor links and generate them automatically using
the toc markdown extension. Links updated to match new anchors.

This fixes the custom links coloring the heading blue,
which isn't the best if user selects the dark theme.

Heading changes done by:
cd docs && sed -i -r 's/(#*).*> (.*?) <\/a>/\1 \2/g' *md */*md */*/*md
* per default, navigation tabs disappear when you scroll down the page,
  which may confuse some users
* hide "Made with Material" footer which is visible when scrolling to
  the bottom, which takes up space and may make the left menu scrollbar
  to appear, and thus reduce usability.
Alphabetical ordering is case sensitive, rename all files to start with
a capital letter.
This was referenced Feb 15, 2022
@Slyke
Copy link
Collaborator

Slyke commented Feb 23, 2022

Hey @ukkopahis sorry this took so long to review. I've approved it now, but it looks like there are now some merge conflicts. I wasn't able to resolve them myself as I can't push to your remote.

@ukkopahis
Copy link
Author

ukkopahis commented Feb 23, 2022

Pull-requests like #489 had changes the same files as this. As such either it or this could be cleanly merged, not both.

Don't know why you couldn't push to my branch. I have "allow edits" ticked:
466-allow-edits
I've invited you as a collaborator to my fork, maybe that will help in the future.

@ukkopahis ukkopahis force-pushed the doc-improvements branch 2 times, most recently from 43bcf72 to 477a064 Compare February 24, 2022 00:27
# Conflicts:
#	.github/workflows/main.yml
#	docs/Containers/Blynk_server.md
#	docs/Containers/Home-Assistant.md
#	docs/Containers/Node-RED.md
#	docs/Containers/Prometheus.md
@ukkopahis
Copy link
Author

ukkopahis commented Feb 24, 2022

Github lost your already reviewed changed when I tried rebasing. So here's the conflict-resolution as a merge commit, and a couple new commits.

@ukkopahis
Copy link
Author

ukkopahis commented Feb 24, 2022

Summary of additional improvements since the previous review.

  • Favicon and logo changed from default to a "stack":
    iotstack-stack-icon
  • Make Wiki home page a bit nicer:
    iotstack-wiki-home
  • Fix too long Octoprint title from showing up in the menu
  • Small incremental improvements to the way too long "Getting Started" page.
    • Extract talk about sudo into a separate "What is sudo?"-page
    • State the importance of the system patches
    • Add that 64-bits also works and is supported (multiple people on Discord have reported to run it without problems)
  • Raise "Updates" to a top-level tab

Post-merge tasks

Paraphraser and others added 7 commits February 24, 2022 23:17
includes some changes from SensorsIot#501
Fixes SensorsIot#500

Co-authored-by: ukkopahis <[email protected]>
source: https://primer.style/octicons/stack-24
Licence: MIT License

The MIT-licence requires for you to include the copyright notice and the
permission notice when using substantial portions of the Software. This
one svg-file is not a substantial portion of the project:
    https://github.com/primer/octicons

As such the licence is only noted in full here:

MIT License

Copyright (c) 2022 GitHub Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Add Discord link to Wiki home page.
Only show relevant (wide/narrow) layout navigation advice.
Hide Navigation and add project mission statement quote.
* better usability, especially on the narrow layout
* also works on the 64-bit Raspberry OS
* state importance of the pathces in no uncertain terms
* rephrase assumptions in a more concise way
* extract small essay about sudo into its own "What is sudo?"-page
* move "updating from gcgarner"-link to the Home page
Copy link

@Paraphraser Paraphraser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realise this is a bit late but, on reflection, I think that moving the "a word about sudo" material to another file might not be a particularly good idea. Rolling back the clock a bit to something like 18 months ago, it seemed like 2 out of every 3 problems raised on Discord could be traced back to improper use of sudo. That fell right off once those words went into the getting started doco. Granted, I also added code to many scripts saying "don't run this with sudo" and that probably also had an impact. But the "getting started" document is The Key Document referred to in the primary read-me. That really puts the words about sudo "in ya face" for new users. I'm not sure it will have the same mindshare if it is moved. I'm sure I don't need to tell you the kinds of chaos that can be created from improper use of sudo. People with reasonable Linux experience probably wouldn't make the mistake in the first place but, if they did, would probably be able to recognise the problem and undo the damage. Those aren't the people I worry about. I worry about people who just follow gists and web pages, who see a Pi as a means to an end rather than something they want to develop a deep understanding of, and who get horribly stuck if they make a basic mistake like sudo git clone ... IOTstack and then find nothing works. I'm not saying "put it back". I'm just asking you to keep these comments in mind if there's an uptick in sudo-related problems in issues and on Discord.

@Slyke Slyke merged commit 9cc8533 into SensorsIot:master Mar 4, 2022
@ukkopahis
Copy link
Author

ukkopahis commented Mar 4, 2022

But the "getting started" document is The Key Document referred to in the primary read-me

I don't think very long "Getting Started" is user friendly.

it seemed like 2 out of every 3 problems raised on Discord could be traced back to improper use of sudo

Good info. I'll monitor for such problems re-occurring, and correct back if needed.

I'm still planning to:

  • extract most from "stack maintenance" to https://sensorsiot.github.io/IOTstack/Updates/ - leaving an executive summary and a link to the Updates page
  • New installation/scripted links to how to update docker, not how to script IOTstack install. Remove or fix this, do you have a suggestion @Paraphraser ?
  • logging journald errors talks about /etc/docker/daemon.json, which doesn't even exist on my pi. Have to look into log2ram to fix this properly. Maybe move this into a FAQ/common problems page?
  • fix all example commands from docker to docker-compose (when possible)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pi-hole not setting default password. broken link
4 participants