Whenever we make bigger changes to the code base or clean up old docs, it's important to preserve the old docs for reference. Here's an example: https://v16.docs.2sxc.org/
Note that for this process, the old docs will need to be rebuilt a few times, so that the layout etc. will be modified to show it's an archive.
Build the Archive
- Create a new repo in https://github.com/2sxc-dev/ using a name like 2sxc-docs-v19
- Git clone to local - at the same level as the old docs
- probably
c:\projects\2sxc-docs-v19
- ...but if the original code has already changed too much, place it in the correct place with older 2sxc/eav code, so that rebuilds will still take that.
- In the original docs, take the latest (or a previous commit) to get the copy which will be archived; copy all of it into that folder.
- Rebuild, verify it works
Mark the Archive Pages to show they are Archives
We need to make changes to the layout similar to the v16 archive.
- Home changes
- Version picker changes in
_master.tmpl
- Change the label
- Change the link to go to the latest version
- Create
archive.md
in the pages like in the v19 (for linking in the menu later)
- Add this note to each page in the
_master.tmpl
- (between the <article...>
tags)
<article data-uid="{{uid}}">
<!-- Special archive note header -->
<div class="alert alert-danger d-print-none">
These v19 docs are <a href="/archive.html">archived 🔒</a>.
Go to the
<a href="https://docs.2sxc.org" target="_blank">latest docs home</a>
or try if
<a href="https://docs.2sxc.org/{{_path}}" target="_blank">this exact page is available</a>
in the latest docs.
</div>
{{!body}}
</article>
Changes to the Build / Template
- Change DocFx Build to Disable Edit
- Change the
docfx.json
to set disableGitFeatures
to false
- Verify that the build now doesn't have "edit this page" in the footer
- Change the current Version Switcher
- Modify the
_master.tmpl
in a way similar to the v19 archive
- Add a
🔒 v## ARCHIVE
to the header w/Link similar to v19 and link to the /archive.html
Add a robots.txt to avoid Indexing
- create a
/docs/robots.txt
(so directly in the output folder) and add this:
User-agent: *
Disallow: /
Change the main Redirector to also list the old pages
todo