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

Migrate to Hugo #1

Closed
13 tasks done
phillxnet opened this issue Jun 23, 2021 · 11 comments · Fixed by #22
Closed
13 tasks done

Migrate to Hugo #1

phillxnet opened this issue Jun 23, 2021 · 11 comments · Fixed by #22

Comments

@phillxnet
Copy link
Member

phillxnet commented Jun 23, 2021

To aid in further significant development, and ease community contribution, including translations, it is proposed that we transition this now hard-coded site to Hugo (Syna theme).

This should be done, given it's breadth, via a dedicated branch. Upon completion we then transition over and remove all hard coding to return again to leaveraging the advantages of a Static Site Generator. Prior now defunct/orphaned generator was thought to be hyde.

Please update the Readme.md file while tending to this issue.

Ongoing progress/TODO list:

  • layouts/_default/single.html fails to make title wider (span12) than content (span8)- edit now center all page titles.
  • make feature summary icons link to specific feature on features browse page.
  • add links on downloads page to sha256 checksum files for all 8 non legacy downloads.
  • add Partners section - likely a partial displaying yet-another hugo section.
  • Banner pic, likely Pi4 and large dash montage/collage type thing. Likely we will drop carousel.
  • migrate the problems/solutions content and formatting from old site.
  • Constrain feature list to the same width/container as the rest of the site.
  • add Alerts section - likely a partial and/or block. Used to flag server maintenance etc.
  • DIY installer section on downloads - possibly by way of a partial.
  • Possibly a testing rpm (versioned) zypper repo add section on downloads (for vanilla Leap installs).
  • Downloads page non constrained width wise.
  • Fix partner logos overlapping on narrow screen.
  • Add missing problem/solution section to custom solutions page. Important as that is a key area for us; given we are a DIY NAS setup.
@phillxnet
Copy link
Member Author

phillxnet commented Jun 23, 2021

I have begun working on this issue but it is in the very early stages, nothing yet worth committing. If you have familiarity with Hugo then feel free to jump in and state you intention to do so here. Otherwise I'll stagger on with my own efforts in this direction as time allows.

We should also keep in mind that maintaining our existing public url link structure is particularly important. We have already lost our prior blog so it would be good if we could maintain existing link function for the rest of our site.

@phillxnet
Copy link
Member Author

It appears from several of the most recent open issues within the Syna theme that it has suffered from a little bit-rot:
https://github.com/okkur/syna/issues
I.e. multiple references to a requirement to downgrade Hugo to 0.76.5.

As we are green-field here I'm keen to not start from a disadvantaged/compromised position with regard to our dependencies, i.e. the theme choice holding back the Hugo version. Now assessing other themes to consider. This is not encouraging and a concern going forward re Hugo and theme choice. Suggestions on appropriate Hugo themes are welcome.

@FroggyFlox
Copy link
Member

As we are green-field here I'm keen to not start from a disadvantaged/compromised position with regard to our dependencies, i.e. the theme choice holding back the Hugo version.

I completely agree with you here. Having to browse for a new theme is a setback, but it's a better choice than having to start with a compromised solution.

@phillxnet
Copy link
Member Author

@FroggyFlox Yes, quite the disappointment as Syna already had many widget fits to our current arrangement. Likely not surprising as it was orientated towards open source projects. Oh well. Searching again now.

@phillxnet
Copy link
Member Author

phillxnet commented Jul 10, 2021

A potential theme could be: https://themes.gohugo.io/themes/hugo-hero-theme/

Simple so doesn't drag in more fragilities (read dependencies) than need be. But I'm not sure we have the images to load it up. We are also more text than images. But it does appear to be compatible with a more modern Hugo. We will also likely have to change some of the menu items names (display at least). Not sure quite what complexities this may invite.

Just noting here as there appear to be very few viable (i.e. new enough) Hugo themes to choose from.

EDIT: Not sure if above theme has multi-language built-in. Or if we get this rolled in with Hugo and the translation of the theme only involves any special widgets or the like.

@phillxnet
Copy link
Member Author

Since a key part of transitioning to Hugo is to take advantage of the multilingual capability, the following is a multilingual filtered theme list:
https://themes.gohugo.io/tags/multilingual/

@phillxnet
Copy link
Member Author

Available themes with multilingual capabilities pre-baked offer insufficient choice. However it looks like we can fairly easily extend a theme to have multilingual capabilities within it's parameters (i.e. links) and navigation (i.e. menu items) thus:

https://gohugo.io/content-management/multilingual/

and for content, linked to from the above gohugo page:

https://www.regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/

This looks, at first glance, something we can take on within our own customizations of whatever theme. Especially since one of our preferred first languages to present in is European Portuguese which is not found in many (if any) pre-baked hugo themes anyway. Hence we will have to add theme side translation anyway.

@phillxnet
Copy link
Member Author

This issue has been delayed, on my part, by inadvertently rolling-in a re-design and attempting to find a nearest fit pre-done theme. I'm now of the opinion that it would be best to transition what we currently have (Hyde output of unknown/lost theme) to an equivalent from-scratch Hugo implementation. This would minimise our dependencies (an external theme) and ease community contribution by simplifying on-boarding by removing the need to also retrieve an external repository. We can then re-theme after this issues completion in a focused issue: to address content discover-ability issues with our current navigation.

This would enable us to more rapidly resolve this issue and open up further contributions to the web-site, such as translations, while also enabling a more active use of this portal while easing on-gong maintenance along the way.

@phillxnet
Copy link
Member Author

I am currently working on this issue.

phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 8, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 8, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 8, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 8, 2021
…ockstor#1

To adopt the default Hugo structure we move our existing static files
from our ./media/* location to the equivalent ./static/ location.

The existing directory structure is maintained for now.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 8, 2021
This was our original plan but Syna became unmaintained as was no longer
compatible with modern Hugo.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 8, 2021
…stor#1

Includes associated menu config entries plus ongoing misc config update.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 8, 2021
To simplify we remove this special case for this icon set.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 8, 2021
Empty main content containers for all current pages.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 9, 2021
…or#1

Place the 'solutions' pages into their own directory. This in turn, as
it is a top level content directory, defines a section. Page type also
defaults to section. We can then use the abstraction of section
templates to similarly format this content.

Includes preliminary attempt to flatten solutions content and present
as-was in baseURL and with ugly url (page-name.html).
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 9, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 9, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 9, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 9, 2021
If no content 'type' is specified then type "page" is the default.
Page type layout is subject to layouts/_default/single.html.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 9, 2021
@phillxnet
Copy link
Member Author

phillxnet commented Oct 9, 2021

TODO list moved to issue head test.

phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 9, 2021
Wrap in container and apply independent title and content classes.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 9, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 27, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 27, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 27, 2021


As these pages are moe walls-of-text they do not work well with global
centering.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 27, 2021
…stor#1

Includes:
shortcode 'wrapper' to apply needed formatting initiated from content.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 27, 2021
Currently our alerts section renders no pages !!
But our sysalerts partial can successfully show partners section as
alerts, or downloads, or features!!
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 27, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 28, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 28, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 28, 2021
…ockstor#1

By using the Page built in we ease our date/time work. Also avoids
having to use .Params etc.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 28, 2021
Multiple sysalerts had no space between them.
Move to generic class 'center' for now.
Remove h tag as overloading formatting unnecessarily.
Draft false on draft avoids requirement for further editing.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 28, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 28, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 28, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 29, 2021
…ockstor#1

Only 3 of the 4 'Solutions' pages have 3 problem/solution presentations.
Make this a full complement by catering for our core DIY audience and
pointing our our Partner capabilities while we are at it.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 29, 2021
Includes item title simplification to ease translation, ie removing:
"Machine type:"
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 29, 2021
If we use the build-in ref shortcode we get auto redirection to
translations. At least that is my understanding currently.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 29, 2021
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 29, 2021
Includes improved header text on downloads page.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 30, 2021
N.B. sysalerts are non draft by default. All other new content is draft
by default.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 30, 2021
@phillxnet
Copy link
Member Author

I'll squash this branch now so it's a single commit to avoid polluting the git history with my work in progress and save points.
Pull request to follow shortly there after.

phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 30, 2021
To aid in further significant development, and ease community
contribution, including translations, transition away from our current
hard-the-hand-coded / ex machine generated site to a custom themed Hugo
setup.

Initially generated via "hugo new site --force ." and with an empty
theme using Hugo v0.88.1+extended.

## Includes:
- Add .gitignore for Hugo and Pycharm.
- Abstract empty layout files from 'hugo new theme' mechanism.
- Move prior content of ./media/ (css, fonts, images, js) to ./static/.
- Move favicon from 'special' ./ico/ directory.
- Maintain existing html file stucture and maning (ugly url) as far as
possible.
- Use hugo content sections for features, downloads, solutions,
partners, and sysalerts.
- Use cascade _build in above sections where appropriate.
- Move EULA to full page format, with header and footer but maintain its
final location.
- Use original FontAwesome github icon as no themify-icons yet.
- Use internal links whereever possible for performance reasons.
- Remove all 'wow' elements for performance and simplicity reasons.
- Remove some text duplication in Solutions front/page to the linked
dedicated pages. This centralises each entry.
- Drop confusing resources page panel. This represented an unneded
navigation mechanism that was almost completely redundant.
- Add Tech Wiki entry, previously only found in resources, to top menu.
- Complete solutions Problem/Solution sections: previously] missing on
custom page.
- Normalise download button away from 'button' to ease translation and
improve look.
- Use several custom shortcodes to ease in-content formatting.
- Simplify formatting where ever possible.
- Drop front page carousell to aid in translation and keep things
simple.
- Fix long standing 'invisible' links across a few pages.
- Drop subset of contributor pics as we link to GitHub where
contirbutors can more easily control their 'appearance'.
- Add multi-email capability and move to linuxlines.com domain for
support.
- Allow for multiple twitter accounts, old and new. With contextual
awareness for those that should be 'featured' in the menu bar.
- Significantly enhance downloads page.
- Add sysalerts capability intended as a notification for system
maintenance 'windows'.
- Add a features browse capability, or list view.
- Avoid using depricated Page.URL, to be removed in future versions of
Hugo.
- Added custom 404.html layout and page content.
- Our prior download.html has become downloads.html. Not ideal but helps
to keep things Hugo esk. I.e. default name for the section 'list'.
- Some initial multi-language capability has been installed.
- Add archetypes for all section content. Aids in new content type
creation. Section pages inherit a page type of their section name.
- Remove redundant #contact sub menu entry that complicated the menu.
- Avoid using "-" in front matter parameters.
- Add single Taxonomy 'os' to aid in downloads section page os parameter
abstraction.
- Add mechanism to list download / install options in preferred order.
- Fix 'Solutions' button by removing now redundant link col override.
- Add features list page menu item.
- Add image test (checksum) and transfer commands to download entries.
- Add rpm install instructions overview to downloads page.
- Add doc links to Downloads page for installer how-to and make usb.
- Update Readme with current website project status.
- Improve and update partners 'panel' on homepage.
- Remove graphical header from all but the homepage.
- Remove jquery.prettyPhoto.js and css.
- Remove html5shiv.js.
- Remove main.js - now redundant custom js.
- Remove older themed carousel images.
- Remove unused download source icons.
- Remove unused search icons.
- Remove unused glyphicons-halflings-regular font.
- Use built in .ExpiryDate (from front matter "expirydate") for alerts.
- Add dedicated DIY installer section on downloads page.
- Set api feature 'page' to draft state as we have no documentation for
this and cannot currently field requests for such.
- Set new content, except sysalerts, to draft by default; via their
respetive archetypes.
- Improve contribution, formatting, and testing advice to readme.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Oct 30, 2021
When building for production we encounter a clash in directories as
although we do not publish any of this sections 'pages' individually
there is still a directory entry and associated xml file. We could
return to our pre-hugo download.html but this is far too similar to the
more intuitive downloads that we otherwise use. So move to 'dls' for
website section/page-type/content/urls.
phillxnet added a commit to phillxnet/rockstor-website that referenced this issue Nov 6, 2021
phillxnet added a commit that referenced this issue Nov 6, 2021
This was referenced Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants