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

Guides on GitHub are not easy to follow #162

Open
robertmcnees opened this issue Jun 24, 2024 · 1 comment
Open

Guides on GitHub are not easy to follow #162

robertmcnees opened this issue Jun 24, 2024 · 1 comment

Comments

@robertmcnees
Copy link

Due to security concerns, Asciidoc include functionality is not rendered on GitHub. The reasons are detailed in this GitHub issue. Because the Spring getting started guides make heavy use of include functionality, the reader will see empty blocks of content if they are consuming the README.md directly from the GitHub page.

For example, the user may see this when visiting the GitHub page:

image

But this when visiting the same guide on spring.io:

image

@robertmcnees
Copy link
Author

A possible solution is to use Asciidoc Reducer with the allow-uri-read option. The GitHub Action could run each time the README.adoc file is changed. The action may look something like:

jobs:
  build:
    runs-on: ubuntu-latest
        # checkout code

      - name: Install Asciidoctor Reducer
        run: sudo gem install asciidoctor-reducer
      - name: Reduce README
        run: asciidoctor-reducer -a allow-uri-read -o README-reduced.adoc README.adoc

        # commit and push README-reduced.adoc

The output of this would be a new README-reduced.adoc file that would show the included content from README.adoc.

This would require coordination with guides renderer. The guides renderer would need to look for a file other than README.adoc to generate content, or GitHub would need to look for a file other than README.adoc to display by default.

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

No branches or pull requests

1 participant