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

Restructure for hugo #183

Closed
wants to merge 10 commits into from
Closed

Restructure for hugo #183

wants to merge 10 commits into from

Conversation

ralphbean
Copy link
Member

No description provided.

@ralphbean ralphbean marked this pull request as draft April 25, 2024 17:27
@ralphbean
Copy link
Member Author

I'm seeing really weird failures here with hugo that I don't understand.

The theme is currently missing. Clone it into the themes directory first.

Then, run hugo server to build and server locally.

Notice that these urls work:

But this url does not work:

That last one should be an index of the design documents... but, it is empty. I can make it render with a list of design docs if I remove what seems to be an arbitrary number of the ADRs in the decisions/ dir, which just makes no sense at all.

@avi-biton
Copy link

Do we need the the HAS documentation?
Isn't it deprecated?


# Style options: default (light-blue), blue, green, marsala, pink, red, turquoise, violet
style = "default"

Copy link

@avi-biton avi-biton Apr 30, 2024

Choose a reason for hiding this comment

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

Try adding this line under [params] to be able to open
http://localhost:1313/architecture/
and http://localhost:1313/decisions

    mainSections = ["architecture", "decisions"]

According to https://gohugo.io/methods/site/mainsections/
if mainSections is not specified, it will only display the section with most pages.

If params.mainSections is not defined in the site configuration, this method returns a slice with one element—the top level section with the most pages.

@zregvart zregvart mentioned this pull request Apr 30, 2024
@zregvart
Copy link
Member

Also have a look at #184

@ralphbean ralphbean added the kind/refactor A bigger change or restructuring label Apr 30, 2024
ralphbean added a commit that referenced this pull request May 6, 2024
@ralphbean
Copy link
Member Author

Do we need the the HAS documentation?
@avi-biton let's keep it in for the restructuring. Removing it should be documented as a decision on its own.

@ralphbean ralphbean marked this pull request as ready for review May 6, 2024 20:21
@ralphbean
Copy link
Member Author

Now that the architecture repo is building successfully at https://konflux-ci.dev/architecture/ with jekyll, I'm not sure I have the motivation to finish this PR - there's still a good bit more cleanup to do to get the style to match https://konflux-ci.dev/

Do either of you want to pick up the remaining work in this PR? If so, feel free to, otherwise I think I'll drop it.

@zregvart
Copy link
Member

zregvart commented May 7, 2024

Do either of you want to pick up the remaining work in this PR? If so, feel free to, otherwise I think I'll drop it.

Beside my bias towards Hugo, I'm not sure much is gained by transition from Jekyll to Hugo. Is there something we wish to gain with this?

@ralphbean
Copy link
Member Author

@zregvart I think the only thing at this point is alignment of the style between https://konflux-ci.dev/ and https://konflux-ci.dev/architecture/

@zregvart
Copy link
Member

zregvart commented May 8, 2024

In konflux-ci/konflux-ci.github.io#39 the custom CSS and images are pulled in to a theme that can be addressable via Hugo modules, i.e. changing the theme in hugo.toml something like:

diff --git a/hugo.toml b/hugo.toml
index b950f08..8172d71 100644
--- a/hugo.toml
+++ b/hugo.toml
@@ -1,7 +1,7 @@
 baseURL = 'http://localhost:1313/'
 languageCode = 'en-us'
 title = 'Standalone Konflux Architecture Docs'
-theme = 'github.com/devcows/hugo-universal-theme'
+theme = ['github.com/konflux-ci/konflux-ci.github.io/website/themes/konflux', 'github.com/devcows/hugo-universal-theme']
 
 # Site language. Available translations in the theme's `/i18n` directory.
 defaultContentLanguage = "en"

Would bring in the styling of konflux-ci.dev

@zregvart
Copy link
Member

zregvart commented May 9, 2024

With #188 the overall styling of konflux-ci.dev website can be inherited here as well.

@zregvart
Copy link
Member

zregvart commented May 9, 2024

In #189 I've restructured the ADR decisions to add front matter and added a custom list layout for decisions, it renders a bit nicer now.

Copy link

github-actions bot commented May 9, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

1 similar comment
Copy link

github-actions bot commented May 9, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

ralphbean and others added 6 commits May 10, 2024 14:43
Adds custom "list" layout and modifies the markdown files to add front
matter.
This adds the theme from konflux-ci.dev as a Hugo module. Any styling
changes there are applied to this website as well.
The version is pinned, so updates to konflux-ci.dev will not be applied
without running `hugo mod get -u`.
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@ralphbean
Copy link
Member Author

@zregvart 00d755c had a side effect that I don't understand. Before it, urls like http://localhost:1313/architecture/release-service/ would render correctly, but after it they do not.

@zregvart
Copy link
Member

@ralphbean pushed 8d69a66 (#183) to fix that

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@zregvart
Copy link
Member

@ralphbean in #190 I've used relref for links and tweaked a number of links so that they point to the local content rather than the published site URL (used to be https://redhat-appstudio.github.io/architecture/). The link checker I use checks relative links and fragments, the only broken links with this seem to be references to removed objects from the API docs.

This was helpful to generate the API docs locally so I can preview and
run the link checker to check for broken links.

Adds the `tools/go.mod` so the version of `crd-ref-docs` can be pinned,
and the tool can be run using `go run`.

In essence one can do `make api-docs` to generate the Markdown files in
`content/ref`. There is a small issue with the
`service-provider-integration-operator`, it needs an additional
`go mod tidy` if golang version is newer than 1.20. To fix that run
`make api-docs` once to clone the repository, then
`cd crd-temp/service-provider && go mod tidy` and rerun `make api-docs`.
@zregvart
Copy link
Member

#191 was useful for previewing locally

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions github-actions bot added the state/stale This hasn't had an update in a long time. Close it? label Aug 14, 2024
@github-actions github-actions bot closed this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/refactor A bigger change or restructuring state/stale This hasn't had an update in a long time. Close it?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants