Comments (20)
Yeah we need to get rid of absolute URLs, there is a macro for base url when needed.
from foreman-documentation.
I see that the baseURL is a common attribute that is not defined dependent on upstream/downstream
Are we in a position now to set the upstream baseurls?
@spetrosi there are only small guides that are left to migrate upstream, aren't there?
from foreman-documentation.
I will test how guides work with BaseURL pointing to docs.theforeman
from foreman-documentation.
My tests resulted in sad results:
Let's compare links for the same section up- and downstream:
- https://docs.theforeman.org/master/Administering_Red_Hat_Satellite/index-foreman.html#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Installing_the_Katello_Root_CA_Certificate
- https://access.redhat.com/documentation/en-us/red_hat_satellite/6.7/html/administering_red_hat_satellite/chap-red_hat_satellite-administering_red_hat_satellite-accessing_red_hat_satellite#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Installing_the_Katello_Root_CA_Certificate
The way the sections are "reffered" in the URLs are very different. If we were to use the BaseURL attribute, the links would look like that:
- {BaseURL}Administering_Red_Hat_Satellite-Installing_the_Katello_Root_CA_Certificate
- {BaseURL}/administering_red_hat_satellite/chap-red_hat_satellite-administering_red_hat_satellite-accessing_red_hat_satellite#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Installing_the_Katello_Root_CA_Certificate
I will try to investigate if we have something to do to make the paths in links identical.
from foreman-documentation.
Thanks @spetrosi
I had similar findings yesterday...but i was hoping it was because I was doing something stupid because I forget things.
from foreman-documentation.
@lzap
Any idea how we can get around this without writing ifevals for links?
from foreman-documentation.
My idea is that we need to somehow publish the upstream documentation in the same way that the downstream docs are published:
-
To publish in multi-paged HTML.
-
To ensure that the URLs upstream use the same format that downstream does - {BaseURL}/guide_name/chapter_name#section_name.
I now look at how we can accomplish this.
from foreman-documentation.
Option 1: Ignore.
This will be only temporary problem until we migrate all books. We can simply ignore this problem and prefer Red Hat Satellite links (so Foreman links are broken for some time - it's WIP anyway and not many of them are broken). The idea is to never use absolute URLs across documentations (even versions), always stick with asciidoc xref.
Option 2: Use symlinks
We can probably setup symlinks on our upstream site so it works. Multipage links are completely different from what we have upstream:
However if you switch over to Single page HTML it's much more close:
Now, the idea is to create symlink upstream: administering_red_hat_satellite/index
-> Administering_Red_Hat_Satellite/index-foreman.html
and then we can keep the downstream links "as is" and they should work for both. We can create those links automatically during the build process so it will not mess up our source folder but we need to be maintaining those manually.
Option 3: Adopt downstream building procedure
While the cleanest option, the big problem with this one is that I don't necessary understand the tooling behind this and I won't be able to provide much help. If you find a commitment from somebody with the know how, it should be relatively easy to switch. However one thing to keep in mind is that we now use GithHub Actions to do the builds and it only provides Ubuntu containers. If the tools do only work on RHEL/CentOS/Fedora than it's a major problem.
from foreman-documentation.
This is being discussed in the issue #192. In this case, this module is likely to be reused, and if it is reused in another guide, xref won't work. Hence the link.
This is a followup of the IPv6 PR discussion (see above).
Are you saying that if a link targets module, we can't use reference? What is the point? I hope we can actually converge to having just xrefs without absolute URLs.
from foreman-documentation.
New option has arrived:
Downstream, we can link to the single-paged html version of docs. This will require manually changing all the links that are currently used. For example, chang this link:
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.7/html/administering_red_hat_satellite/chap-red_hat_satellite-administering_red_hat_satellite-accessing_red_hat_satellite#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Setting_a_Custom_Login_Message
To this:
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.7/html-single/administering_red_hat_satellite/index#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Setting_a_Custom_Login_Message
And upstream this link has the following format:
https://docs.theforeman.org/master/Administering_Red_Hat_Satellite/index-foreman.html#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Setting_a_Custom_Login_Message
The format for single-paged html is the same upstream and downstream, therefore we will be able to make use of the BaseURL attribute, the resulting link will be:
{BaseURL}administering_red_hat_satellite/index#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Setting_a_Custom_Login_Message
The drawback is that we historically use links to multi-paged html across the who docs department because this way users do not need to download the whole book when they need to read only one section, so this is something that I need to negotiate with managers.
But at the same time, things are changing quickly in Red Hat and any other decision might stop working in several months because something might change.
from foreman-documentation.
One more difference in the single-paged html links: Foreman uses index-foreman.html
and Satellite uses index
. Where does this come from? It will be great if we can make Foreman do just index
, but at the same time we can use an attribute to manipulate this.
from foreman-documentation.
Single paged HTML causes accessibility issues for our customers in low bandwidth and that is the motivation behind multi-page HTML being the default.
I think this would be a bad solution..
from foreman-documentation.
Foreman uses
index-foreman.html
and Satellite usesindex
. Where does this come from? It will be great if we can make Foreman do justindex
Well upstream have multiple kinds of documentation, foreman and debian. We cannot just use index.html, it needs to be different at some point.
I think this would be a bad solution..
Then let's find a better one. But sometimes a bad solution is better than no solution. Compare this to 404... :-)
from foreman-documentation.
Another idea: I can write a script that will change links during downstream syncing process. I assume that all links are on single line (no links are broken into multiple lines) therefore this would be possible with just sed command.
from foreman-documentation.
I take back what I said about accessibility earlier because this practice will be done away with regardless of whether it is a good or bad move.
from foreman-documentation.
Hey all.
We at ATIX are currently evaluating how to incorporate upstream documentation to our own downstream docs. We settled on asciidoc as per requirement by Red Hat and choose Antora to built the website.
We are using xref:path/to/file.adoc[fancy title]
to set internal cross references from one page to another.
I would prefer a solution that allows us to comfortably change links (both their source and their title) via an attribute as in guides/common/attributes.adoc
.
I wrote a python script to do exactly that (which I'd also share if you're interested).
If anyone wants to talk about Antora, please feel free to message me! I'd be happy so share some insights. :)
from foreman-documentation.
Antora's output looks great, however I wonder how much compatible this can be with the original AsciiDoc (which is written in Ruby). Red Hat documentation team uses the original AsciiDoc with some legacy pipeline which generate artifacts. That's why we started with less intrusive make. Granted the final output is not ideal and this is something we yet need to solve.
My idea was set of Makefiles and shell scripts to produce plain HTML/PDF files in varius subdirectories like /master
and /2.3
. No searching, no fancy features, plain CSS. But if we find a way to integrate Antora in a way that it also works with the legacy AsciiDoc and the pipeline, then we could use it. Searching is particularly great and finds relevant results.
from foreman-documentation.
The main selling point for me is the optional search capabilities as well as the navigation. Having a lot of stand alone html output files is not always sufficient. Let me know if I can showcase something to you.
Apart from that (and back to topic), I hope as much as possible customisation can be handled via variables as seen in the attributes.adoc
file.
from foreman-documentation.
Thanks for your work on this @spetrosi
from foreman-documentation.
Cheers!
from foreman-documentation.
Related Issues (20)
- Depends on build target
- What is a "blank" host? HOT 5
- Unsure if we should use "provider_type" in some way. See `rg "provider_type:"` in foreman_remote_execution.
- Extend lists of supported OSs for upstream too HOT 1
- Clarify terminology: SmartProxy/SmartProxyServer, Internal/External/Isolated HOT 3
- Check and (if necessary) update supported versions for upstream and downstreams
- Overview docs are missing a chapter on config management HOT 1
- Overview docs are missing information about the REX pull mode under remote execution
- Add warning about EPEL not being supported in the repo setup section of install/update guides
- Planning for {Project} Guide - Content Sources terminology
- should we drop 'Content hosts'? HOT 3
- friendly reminder: do not forget to cherry-pick to 3.10! HOT 3
- Reword "internal Smart Proxy" and "external Smart Proxy" HOT 1
- Restructure branches into web and guides (nightly, X.Y, etc) HOT 4
- Decide on foreman-installer "--option=true" vs --option true" HOT 4
- Re-document katello-pull-transport-migrate
- Check if "Content Host" needs to be removed from Prereqs too HOT 7
- Add hint about default Puppet Environment HOT 2
- Fix version details - RHEL7 to RHEL8 on Satellite v6.12 - v6.15 in performance tuning doc HOT 1
- Removal of {context} from IDs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foreman-documentation.