-
Notifications
You must be signed in to change notification settings - Fork 12
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
Load the glossary from the Octez docs #417
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Looks great! I generated the glossary and built the doc locally, and everything seems fine. |
Made external links open in a new tab and show the external link icon. |
9edd7e7
to
cc4ca23
Compare
Strangely, I see now an empty page with just a link to the Octez glossary, which indeed opens in a new tab. So this could also work, but I think it's not what you're trying to do, right? |
There's a glitch in docusaurus; when I edit the page after the build, the docusaurus serve command shows the old page -- it caches it somehow. When we deploy to AWS, only the built output gets pushed, not the cache, so I think this will work. I'm investigating the cache issue. |
I've reworked this PR to edit the glossary file before the build to avoid the docusaurus caching issue. Now you can see the imported glossary in the preview: https://docs-staging-git-include-html-trili-tech.vercel.app/overview/glossary |
Beware, you import the glossary for Alpha, but you should import the active protocol's instead (from https://tezos.gitlab.io/active/glossary.html). |
The terms no longer appear in bold, it was nicer before! |
Clicking on a term goes a bit after its definition (both in Safari and Firefox), is this hard to fix? |
Links to the pages within the Octez, such as "Slashing" or "application time" don't work. Their URL contains "...//..." instead of ".../active/...". |
Fixed, thx for catching that regression.
Fixed.
I see this in the output of the
Investigating... |
This issue should be fixed when merging https://gitlab.com/tezos/tezos/-/merge_requests/13987. Or use already the script in that branch: https://gitlab.com/nomadic-labs/tezos/-/raw/nic@global-glossary-doc/docs/scripts/extract_content. |
20ab4fd
to
24bf2ea
Compare
I don't know why this is happening so I added a custom script to add some space after the user clicks an anchor on the page. It won't work if the user comes to the page directly via a URL. |
Yes, that new script seems to work. It leaves only a few URLs like this, which look odd but work: |
I wanted to validate your last version, but when I run
Any suggestion? |
@NicNomadic An element changed in the glossary. Load my updated version and it should work now. |
I checked that most of the issues I raised have been solved, including:
However, it remains the following one:
Now links no more contain "...//...", but they don't have the right prefix, which should be |
This build process runs the conversion script at https://gitlab.com/tezos/tezos/-/raw/master/docs/scripts/extract_content?ref_type=heads&inline=false, which should fix the links. I'll investigate. |
@NicNomadic This seems to work: I've taken the two find-replace commands from your https://docs-staging-iibre089k-trili-tech.vercel.app/overview/glossary |
I agree that this is a low-cost and somewhat fragile solution, but I tried with Pandoc and it didn't handle the advanced RST combinations used in the glossary, so for the least this other solution requires more work to set up. What if we start with the current simple solution as long as it works (modulo simple adaptations), and if this becomes too difficult later on, we can explore further the Pandoc-based track? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Grab the glossary from the Octez docs, use the script they provide to extract the content, and overwrite the existing glossary.md file.
I tried editing the output HTML file after the build, but in that case Docusaurus was caching the old version of the file. Based on discussion with some colleagues, it appears to be better to do this manipulation before the build.