rdblue commented on code in PR #8659: URL: https://github.com/apache/iceberg/pull/8659#discussion_r1342178970
########## docs-new/README.md: ########## @@ -0,0 +1,123 @@ +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + +# making-iceberg-docs + +Testbed for the Iceberg docs. + +## Requirements + +* Python >=3.9 +* pip + + +## Build process + +The directory structure is intended to mimic the tree hierarchy of the website. This will enable contributors to find the documentation they need to update easier. The static and documentation will reside in the same location. + +All static pages are all the `./home/.*md` files and the docs are the `.home/docs/<version>/*.md` files. Notice the location of the `mkdocs.yml`. + +Looking at this though, you may ask where the older versions and javadocs are. + +``` +. +├── home +│ ├── assets +│ │ └── images +│ ├── docs +│ │ └── latest +│ │ ├── assets +│ │ ├── api.md +│ │ ├── aws.md +│ │ ├── branching.md +│ │ ├── ... +│ │ ├── **mkdocs.yml(docs)** +│ │ ├── ... +│ │ ├── spark-structured-streaming.md +│ │ ├── spark-writes.md +│ │ └── table-migration.md +│ ├── ASF.md +│ ├── about.md +│ ├── ... +│ ├── vendors.md +│ └── view-spec.md +├── LICENSE +├── README.md +├── **mkdocs.yml(static)** +├── requirements.txt +└── variables.yml +``` + +All of the documentation versions are saved in special `docs-<version>` tags that only contain the root of the docs version they contian. There is also a `javadoc` tag that contains all prior versions of the javadocs in a single tag. These are generated and loaded only at build time using the [git-worktree](https://git-scm.com/docs/git-worktree) docs. + +``` +. +├── home +│ ├── docs +│ │ ├── latest +│ │ ├── 1.3.1 +│ │ ├── 1.3.0 +│ │ └── ... +│ ├── javadoc +│ │ ├── latest +│ │ ├── 1.3.1 +│ │ ├── 1.3.0 +│ │ └── ... +``` + +## Install + +``` +python -m venv mkdocs_env +source mkdocs_env/bin/activate + +pip install -r requirements.txt +``` + +## Add git worktrees + +For now, I'm just adding a single version + +``` +git worktree add home/docs/1.3.1 docs-1.3.1 +git worktree add home/javadoc javadoc +``` + +## Build + +``` +mkdocs build +mkdocs serve +``` + +## Validate Links + +Due to the delayed aggregation of subdocs of `mkdocs-monorepo-plugin` there are some warnings that display for subdocs that mkdocs are not able to connect due to being off by a single directory when the version directory is added, which doesn't mirror the directory layout on disk. + +To ensure the links work, I am temporarily using a tool called linkchedker, which will traverse the links on the livesite. +``` +pip install linkchecker + +./linkchecker http://localhost:8000 -r1 -Fcsv/link_warnings.csv Review Comment: Sounds like more reason to show the command to view the output. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org