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: add Antora SSG #179

Closed
wants to merge 1 commit into from
Closed

guides: add Antora SSG #179

wants to merge 1 commit into from

Conversation

davlgd
Copy link
Collaborator

@davlgd davlgd commented Feb 3, 2024

Checklist

  • My PR is related to an opened issue : #

⚠️ If changes affect GitHub Action files

  • I have added tests to cover my changes : link

Pull request type

Please check the type of change your PR introduces:

  • Documentation content changes
  • Bugfix on the site
  • Build related changes
  • Other (please describe):

Description

Add a SSG guide for Antora

@davlgd davlgd requested review from cnivolle and juliamrch February 3, 2024 14:50
@davlgd davlgd self-assigned this Feb 3, 2024
Copy link

github-actions bot commented Feb 3, 2024

Deployment has finished 👁️👄👁️ Your app is available here

@davlgd davlgd changed the title Add Antora SSG guide guides: add Antora SSG Feb 3, 2024
@juliamrch
Copy link
Collaborator

Thanks @davlgd I will test the tutorial and merge if nothing needs to be added to the tutorial

@juliamrch juliamrch added the documentation Improvements or additions to documentation label Feb 5, 2024
Copy link
Collaborator

@juliamrch juliamrch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page is a good start to document Antora.

Would you mind providing more details and write a guide page that goes more in deep into what's Antora, why to use it, and a step by step tutorial on how to create and configure it before deploying?

---
[Antora](https://antora.org/) is an [AsciiDoc](https://asciidoc.org/) based Static Site Generator focused on technical documentation writing. It promotes *docs as code*, using a YAML playbook and git repositories to organize and host content. If you need an example source code, use the [demo playbook](https://docs.antora.org/antora/latest/install-and-run-quickstart/#create-a-playbook) (you'll need [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Node.js](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs)):
```bash
git init
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we init a .git repository outside the app?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why outside the app ? It's the initial git init we'll need later to commit/deploy.

As mentioned here, this guide/example is based on the default playbook provided in the Antora documentation as an example.

npm i -D -E @antora/cli @antora/site-generator
echo -e "site:\n title: Antora Docs\n start_page: component-b::index.adoc\ncontent:\n sources:\n - url: https://gitlab.com/antora/demo/demo-component-a.git\n branches: HEAD\n - url: https://gitlab.com/antora/demo/demo-component-b.git\n branches: [v2.0, v1.0]\n start_path: docs\nui:\n bundle:\n url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable\n snapshot: true" > antora-playbook.yml

```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • what are the flags you're using and why to you use them?
  • what exactly is doing this script?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-D is to use packages as dev dependencies. -E can be removed here as I remove the exact version (but we can also use latest version in this command if you prefer).

The echo line is to create the playbook.yml demo file which will be used to deploy

@juliamrch
Copy link
Collaborator

General overview: this guide brings more confusion than clarity about Antora deployments.

It should contain more details, steps, issues that could arise in a cloud environment, etc. Overall, our SGG section is quite incomplete and misleading, guides stay superficial and reveal a drastic lack of knowledge of different framework specs, and their potential issues with our runtimes.

In order to merge this guide, it should contain, at least:

  1. A step by step full project configuration
  2. Specific configuration and how to manage them on Clever Cloud

@juliamrch juliamrch added the waiting Waiting from fixes or tests by submitter label Feb 15, 2024
@davlgd
Copy link
Collaborator Author

davlgd commented Feb 15, 2024

I'm not sure to understand what's asked here. This guide explains mostly how to deploy a sample project (the Antora demo playbook they provide in their documentaiton) with env vars needed on our platform. Thus, the two points you're asking for are already here from my pov.

I'm not aware of any issue that could arise in such a deployment. Maybe on the development side, but I don't think it's a good practice to reproduce Antora's (or any other framework) documentation in our guides.

BTW these guides are a starting point (better than none) we can complete as we're asked details by users.

@Keksoj
Copy link
Contributor

Keksoj commented Feb 16, 2024

The best thing, in my opinion, would be to add a prerequisite disclaimer on all Static Site Generator deployment pages:

Requirements

This guide assumes you are acquainted with <this-SSG> and have gone through their <getting-started-link> to run an instance of <this-SSG> on your machine.

@juliamrch
Copy link
Collaborator

juliamrch commented Feb 19, 2024

I'm not sure to understand what's asked here.

How can I make this more specific?

the two points you're asking for are already here from my pov.

The two points are:

  1. A step by step full project configuration: where is that located in your doc? I only see a script with a git init command outside of the repository. Where is the step-by-step concept of a guide?

  2. Specific configuration and how to manage them on Clever Cloud: this part isn't sufficiently explained. En vars can't be throwed without reference or explanation on why they are needed, for example.

I'm not aware of any issue that could arise in such a deployment.

You should. If you are writing a guide on deploying some technology, that should be the number one requirement before submitting any PR.

better than none

Agree to disagree

@juliamrch
Copy link
Collaborator

The best thing, in my opinion, would be to add a prerequisite disclaimer on all Static Site Generator deployment pages:

Requirements

This guide assumes you are acquainted with <this-SSG> and have gone through their <getting-started-link> to run an instance of <this-SSG> on your machine.

To be honest, some software run great on local but encounter issues on Clever Cloud, as will any code running on any server that is set up differently. The goal of the guides is to fill the gap between that software running on local without any problem and the Clever Cloud servers.

I agree that successfully starting it on local is a basic requirement that we should specify.

@davlgd
Copy link
Collaborator Author

davlgd commented Feb 19, 2024

  1. A step by step full project configuration: where is that located in your doc? I only see a script with a git init command outside of the repository. Where is the step-by-step concept of a guide?

Some tools init the local git repo during template creation, some not. As we need a git repo to deploy, I git init. I don't understand why you say it's outside of the repository ?

Then, I setup the npm packages and write the demo playbook (from the official documentation, linked above). I don't think such commands needs to be presented as 1-2-3 steps, but if you prefer to, feel free.

  1. Specific configuration and how to manage them on Clever Cloud: this part isn't sufficiently explained. En vars can't be throwed without reference or explanation on why they are needed, for example.

I followed here the same template as previous SSG guides where I didn't have such comment. If you will I can add a sentence/paragraph to explain what they do and a link to reference.

@davlgd
Copy link
Collaborator Author

davlgd commented Feb 19, 2024

About the "outside of the repository", I see. It's because in other SSG guides, the myStaticApp folder is created during the first step. Here, it's not.

So tell me if you prefer:

  • Move the cd myStaticApp in the first part in all SSG guides
  • Add a mkdir / cd / cd .. in the first part of this guide only
  • Another solution

@juliamrch
Copy link
Collaborator

I'm rewriting the guides (eg. this PR) because they are unclear and crowded with useless information. I would prefer not to add another guide I'd need to rewrite, they are already too many. We should discuss this on one on one and set guides standards that we both agree with.

@davlgd
Copy link
Collaborator Author

davlgd commented Feb 22, 2024

I'm more likely to think that such standards should be discussed and defined team-wide, as they'll be applied team-wide. But we can start the discussion 1-1.

@juliamrch
Copy link
Collaborator

Let's do this

@juliamrch juliamrch marked this pull request as draft April 5, 2024 15:41
@juliamrch
Copy link
Collaborator

What's the update on this guide?

@juliamrch
Copy link
Collaborator

Closing this draft as it's accumulating conflicts since February and there's no progress. Re-open on a new branch or rebase the current one.

@juliamrch juliamrch closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation waiting Waiting from fixes or tests by submitter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants