Commit bec437b0 authored by Christopher Guindon's avatar Christopher Guindon
Browse files

update documentation


Signed-off-by: Christopher Guindon's avatarChristopher Guindon <chris.guindon@eclipse-foundation.org>
parent e2b03f07
......@@ -4,15 +4,15 @@ Thanks for your interest in this project.
## Project description
hugo-solstice-theme is a project to regroup assets for the Eclipse Foundation look and feel.
hugo-solstice-theme is a project to regroup assets for the Eclipse Foundation look and feel.
* https://github.com/eclipsefdn/hugo-solstice-theme
* https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
## Developer resources
The project maintains the following source code repositories
* https://github.com/eclipsefdn/hugo-solstice-theme
* https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
## Eclipse Contributor Agreement
......
......@@ -2,7 +2,7 @@
This content is produced and maintained by the Eclipse Foundation.
* Project home: https://github.com/EclipseFdn/hugo-solstice-theme
* Project home: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
## Trademarks
......@@ -32,7 +32,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
The project maintains the following source code repositories:
* https://github.com/EclipseFdn/hugo-solstice-theme
* https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
## Third-party Content
......
# hugo-solstice-theme
The official [Hugo](https://gohugo.io/) theme from the Eclipse Foundation.
## Getting Started
Dependencies:
......@@ -44,7 +46,7 @@ set NODE_ENV=production && npm install
#### Alternative Solution
Install [win-node-en](https://github.com/laggingreflex/win-node-env) globally and then install our dependencies by following the steps from our [Getting Started](https://github.com/EclipseFdn/hugo-solstice-theme#getting-started) section.
Install [win-node-en](https://github.com/laggingreflex/win-node-env) globally and then install our dependencies by following the steps from our [Getting Started](https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/#getting-started) section.
```bash
yarn add -g win-node-env
......@@ -54,6 +56,14 @@ yarn add -g win-node-env
Versions of Hugo 0.60 and beyond do not support raw HTML in markdown files by default. To enable this feature, unsafe HTML rendering can be enabled in the Goldmark engine in the site configuration. This is not recommended as it exposes rendered content vulnerable to injected content on the site.
## Contributing
1. [Fork](https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html) the [solstice-assets](https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/) repository
2. Clone repository: `git clone https://gitlab.eclipse.org/[your_github_username]/hugo-solstice-theme.git`
3. Create your feature branch: `git checkout -b my-new-feature`
4. Commit your changes: `git commit -m 'Add some feature' -s`
5. Push feature branch: `git push origin my-new-feature`
6. Submit a merge request
## Documentation
......@@ -61,7 +71,7 @@ Versions of Hugo 0.60 and beyond do not support raw HTML in markdown files by de
## Bugs and Feature Requests
Have a bug or a feature request? Please search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/eclipsefdn/hugo-solstice-theme/issues/new).
Have a bug or a feature request? Please search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=).
## Author
......@@ -78,4 +88,4 @@ Have a bug or a feature request? Please search for existing and closed issues. I
## Copyright and License
Copyright 2018-2020 the [Eclipse Foundation, Inc.](https://www.eclipse.org) and the [hugo-solstice-theme authors](https://github.com/eclipsefdn/hugo-solstice-theme/graphs/contributors). Code released under the [Eclipse Public License Version 2.0 (EPL-2.0)](https://github.com/jakartaee/jakartaee.github.io/blob/src/LICENSE).
Copyright 2018-2021 the [Eclipse Foundation, Inc.](https://www.eclipse.org) and the [hugo-solstice-theme authors](https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/graphs/master. Code released under the [Eclipse Public License Version 2.0 (EPL-2.0)](https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/raw/master/LICENSE).
......@@ -241,7 +241,7 @@
[[sidebar]]
name = "GitHub repository"
url = "https://github.com/EclipseFdn/hugo-solstice-theme"
url = "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme"
weight = 2
parent = "home"
pre = "<i class=\"fa fa-github fa-fw\"></i>"
......
......@@ -235,7 +235,7 @@
[[sidebar]]
name = "GitHub repository"
url = "https://github.com/EclipseFdn/hugo-solstice-theme"
url = "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme"
weight = 2
parent = "home"
pre = "<i class=\"fa fa-github fa-fw\"></i>"
......
......@@ -236,7 +236,7 @@
[[sidebar]]
name = "Page GitHub"
url = "https://github.com/EclipseFdn/hugo-solstice-theme"
url = "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme"
weight = 2
parent = "home"
pre = "<i class=\"fa fa-github fa-fw\"></i>"
......
......@@ -235,7 +235,7 @@
[[sidebar]]
name = "GitHub repository"
url = "https://github.com/EclipseFdn/hugo-solstice-theme"
url = "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme"
weight = 2
parent = "home"
pre = "<i class=\"fa fa-github fa-fw\"></i>"
......
......@@ -235,7 +235,7 @@
[[sidebar]]
name = "GitHub repository"
url = "https://github.com/EclipseFdn/hugo-solstice-theme"
url = "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme"
weight = 2
parent = "home"
pre = "<i class=\"fa fa-github fa-fw\"></i>"
......
......@@ -235,7 +235,7 @@
[[sidebar]]
name = "GitHub repository"
url = "https://github.com/EclipseFdn/hugo-solstice-theme"
url = "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme"
weight = 2
parent = "home"
pre = "<i class=\"fa fa-github fa-fw\"></i>"
......
......@@ -235,7 +235,7 @@
[[sidebar]]
name = "GitHub repository"
url = "https://github.com/EclipseFdn/hugo-solstice-theme"
url = "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme"
weight = 2
parent = "home"
pre = "<i class=\"fa fa-github fa-fw\"></i>"
......
......@@ -21,7 +21,7 @@ tagline: Come meet the Eclipse Community at these upcoming events!
#buttons
more_button_text: View More Events <i class="fa fa-arrow-down"></i>
submit_button_text: Submit Event
submit_button_link: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
submit_button_link: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
items:
-
......@@ -29,14 +29,14 @@ items:
location: Location, Location
date: Month xx, xxxx
expire_date: 2030-03-28T23:59:00-00:00
button_url: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
button_url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
button_text: Button text
-
name: Example Event 2
location: Location, Location
date: Month xx, xxxx
expire_date: 2030-03-28T23:59:00-00:00
button_url: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
button_url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
button_text: Button text
~~~~
......
......@@ -19,12 +19,12 @@ items:
type_1:
-
title: Type 1 - Hugo Solstice Theme Num-1
url: https://github.com/EclipseFdn/hugo-solstice-theme
url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
type_2:
-
title: Type 2 - Hugo Solstice Theme Num-1
url: https://github.com/EclipseFdn/hugo-solstice-theme
url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
~~~~
**Examples:**
......
......@@ -6,43 +6,43 @@ date: 2020-01-19T00:00:00-04:00
So you want to translate your site, eh? Here are a few things you'll need! The first thing isn't a file, but a code, a language code. This should be the ISO 639-1 code that represents the language you wish to translate for the site. An easily read list of these codes can be found on the [Wikipedia page for ISO 639-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). This code will be used a few times, so please note it down.
## [Eclipsefdn/hugo-solstice-theme](https://github.com/eclipsefdn/hugo-solstice-theme) requirements:
1. Create a new file for the new language based on `./i18n/en.toml`. Copy this file into the same folder and rename it `<YOUR ISO 639-1 CODE>.toml`. This file will be made available to all sites once updated and includes all of the required labels needed for translation in basic sites. Update all of the terms to represent your new value.
## [Eclipsefdn/hugo-solstice-theme](https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme) requirements:
1. Create a new file for the new language based on `./i18n/en.toml`. Copy this file into the same folder and rename it `<YOUR ISO 639-1 CODE>.toml`. This file will be made available to all sites once updated and includes all of the required labels needed for translation in basic sites. Update all of the terms to represent your new value.
Example For the [Spanish translation file, es.toml](https://github.com/EclipseFdn/hugo-solstice-theme/blob/master/i18n/es.toml)
Example For the [Spanish translation file, es.toml](https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/blob/master/i18n/es.toml)
```
[navbar-manage-cookies-label]
other = "Manage Cookies"
```
```
Becomes:
Becomes:
```
[navbar-manage-cookies-label]
other = "Administrar cookies"
```
```
2. Update the [default languages file of the example site](https://github.com/EclipseFdn/hugo-solstice-theme/blob/master/exampleSite/config/_default/languages.toml). While not strictly required, updating this file can help preview and troubleshoot the changes being made within the translation files. In this section, copy the English section and paste it at the end of the file and make the following updates:
- Update the language code in brackets in the first line with your language code
2. Update the [default languages file of the example site](https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/blob/master/exampleSite/config/_default/languages.toml). While not strictly required, updating this file can help preview and troubleshoot the changes being made within the translation files. In this section, copy the English section and paste it at the end of the file and make the following updates:
- Update the language code in brackets in the first line with your language code
- update the `languageName` property to have a value of the language's name in its own language
- Increment the `weight` to be one greater than the greatest weight currently available. This only impacts the order of languages appearing in the language selector dropdown and does not impact content otherwise.
- Increment the `weight` to be one greater than the greatest weight currently available. This only impacts the order of languages appearing in the language selector dropdown and does not impact content otherwise.
Example using Spanish:
```
Example using Spanish:
```
[en]
languageName = "English"
weight = 1
```
Becomes:
Becomes:
```
[es]
languageName = "Español"
weight = 3
```
```
3. If you are making a sample in the example site for the newly translated language, please also complete the following steps:
- in `./exampleSite/content`, copy the `_index.md` file and paste it into the same folder, renaming it `_index.es.md`. This will set up the homepage for the new language for easy testing. For the example site, this is the only required page as we want to ensure that the language properly works with all of the labels.
- In `./exampleSite/config/_default`, copy the [menus.en.toml file](https://github.com/EclipseFdn/hugo-solstice-theme/blob/master/exampleSite/config/_default/menus.en.toml), pasting and renaming to `menus.<YOUR ISO CODE.toml`. This doesn't need to be translated, as it just ensures that the site compiles properly in the given language.
- in `./exampleSite/content`, copy the `_index.md` file and paste it into the same folder, renaming it `_index.es.md`. This will set up the homepage for the new language for easy testing. For the example site, this is the only required page as we want to ensure that the language properly works with all of the labels.
- In `./exampleSite/config/_default`, copy the [menus.en.toml file](https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/blob/master/exampleSite/config/_default/menus.en.toml), pasting and renaming to `menus.<YOUR ISO CODE.toml`. This doesn't need to be translated, as it just ensures that the site compiles properly in the given language.
## Target site requirements
......@@ -51,20 +51,20 @@ To enable the site to use the new language, a few things need to happen. If ther
Within the `./config.toml` file, a few changes will need to be made:
1. in the `[languages]` section, a new subsection should be added for the new language. This will differ slightly from the change made in step 2 of the hugo-solstice-theme changes as only our example site has had the configuration values split into multiple files for easier management (while this is planned for the future, it is not currently scheduled to be done).
If the [languages] section is not present, please add it to the file containing both English (our default language) and the new language. An example can be seen in the [Jakarta.EE site configuration file](https://github.com/jakartaee/jakarta.ee/blob/src/config.toml#L197) which has the English and Chinese languages set.
If the [languages] section is not present, please add it to the file containing both English (our default language) and the new language. An example can be seen in the [Jakarta.EE site configuration file](https://github.com/jakartaee/jakarta.ee/blob/src/config.toml#L197) which has the English and Chinese languages set.
Example)
```
[languages.en]
languageName = "English"
weight = 1
```
Becomes:
weight = 1
```
Becomes:
```
[languages.es]
languageName = "Español"
weight = 1
```
weight = 1
```
2. Create language copies of the site metadata properties needed for search engine returns. There are a couple of site properties injected on every page for things like the page title, keywords for search engines, and generic site descriptions if none are set for pages. These properties need to be created as a subsection beneath the `[languages]` section to ensure they are properly registered on the site. The properties that need to be translated are as follows:
- description
......@@ -83,6 +83,6 @@ Within the `./config.toml` file, a few changes will need to be made:
If `languages.en` is not set in front of the `main.menu` entries that are copied, add `languages.<ISO code>` in front of the name (e.g. `[[menu.main]]` becomes `[[languages.es.menu.main]]`). Each of the name fields in the copied menu entries should be translated, and the URLs should be updated to reflect the translated page path (e.g. `/community/resources` would become `/es/community/resources`).
In addition to the config.toml changes, any pages that are required for the new site language should be translated. This is typically all pages in the `./content` folder, though this may vary from site to site. On copying the English versions, they should be named `<page name>.<ISO code>.md`
In addition to the config.toml changes, any pages that are required for the new site language should be translated. This is typically all pages in the `./content` folder, though this may vary from site to site. On copying the English versions, they should be named `<page name>.<ISO code>.md`
A release of hugo-solstice-theme needs to be done by the EF webdev team containing the translation values. This will allow for the targeting of a version of the theme with the new translation values. The EF team will be able to increment the version of the theme for the site (as there are some checks we need to do to make sure everything is compatible with the new version).
\ No newline at end of file
......@@ -4,7 +4,7 @@ tagline: Come meet the Eclipse Community at these upcoming events!
#buttons
more_button_text: View More Events <i class="fa fa-arrow-down"></i>
submit_button_text: Submit Event
submit_button_link: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
submit_button_link: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
items:
-
......@@ -12,40 +12,40 @@ items:
location: Location, Location
date: Month xx, xxxx
expire_date: 2030-03-28T23:59:00-00:00
button_url: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
button_url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
button_text: Button text
-
name: Example Event 2
location: Location, Location
date: Month xx, xxxx
expire_date: 2030-03-28T23:59:00-00:00
button_url: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
button_url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
button_text: Button text
-
name: Example Event 1
location: Location, Location
date: Month xx, xxxx
expire_date: 2030-03-28T23:59:00-00:00
button_url: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
button_url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
button_text: Button text
-
name: Example Event 2
location: Location, Location
date: Month xx, xxxx
expire_date: 2030-03-28T23:59:00-00:00
button_url: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
button_url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
button_text: Button text
-
name: Example Event 1
location: Location, Location
date: Month xx, xxxx
expire_date: 2030-03-28T23:59:00-00:00
button_url: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
button_url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
button_text: Button text
-
name: Example Event 2
location: Location, Location
date: Month xx, xxxx
expire_date: 2010-03-28T23:59:00-00:00
button_url: https://github.com/EclipseFdn/hugo-solstice-theme/issues/new
button_url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=
button_text: Button text
\ No newline at end of file
......@@ -2,19 +2,19 @@ items:
type_1:
-
title: Type 1 - Hugo Solstice Theme Num-1
url: https://github.com/EclipseFdn/hugo-solstice-theme
url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
-
title: Type 1 - Hugo Solstice Theme Num-2
url: https://github.com/EclipseFdn/hugo-solstice-theme
url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
type_2:
-
title: Type 1 - Hugo Solstice Theme Num-1
url: https://github.com/EclipseFdn/hugo-solstice-theme
url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
-
title: Type 1 - Hugo Solstice Theme Num-2
url: https://github.com/EclipseFdn/hugo-solstice-theme
url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
-
title: Type 1 - Hugo Solstice Theme Num-3
url: https://github.com/EclipseFdn/hugo-solstice-theme
url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
......@@ -6,11 +6,11 @@
"license": "EPL-2.0",
"version": "0.0.131",
"bugs": {
"url": "https://github.com/EclipseFdn/hugo-solstice-theme/issues"
"url": "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues"
},
"repository": {
"type": "git",
"url": "git://github.com/eclipsefdn/hugo-solstice-theme.git"
"url": "git@gitlab.eclipse.org:eclipsefdn/it/webdev/hugo-solstice-theme.git"
},
"scripts": {
"dev": "NODE_ENV=development webpack --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
......@@ -24,7 +24,7 @@
"readmeFilename": "README.md",
"dependencies": {
"axios": "^0.21.1",
"eclipsefdn-solstice-assets": "0.0.167",
"eclipsefdn-solstice-assets": "0.0.174",
"json2yaml": "^1.1.0",
"parse-link-header": "^1.0.1",
"toml": "^3.0.0"
......
name = "hugo-solstice-theme"
license = "EPL-v2"
licenselink = "https://github.com/EclipseFdn/hugo-solstice-theme/blob/master/LICENSE.md"
licenselink = "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/blob/master/LICENSE.md"
description = ""
homepage = "https://www.eclipse.org/"
tags = ["", ""]
......
let mix = require('laravel-mix');
require('laravel-mix-transpile-node-modules')
mix.transpileNodeModules(['eclipsefdn-solstice-assets']);
/*!
* Copyright (c) 2021 Eclipse Foundation, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* Contributors:
* Christopher Guindon <chris.guindon@eclipse-foundation.org>
*
* SPDX-License-Identifier: EPL-2.0
*/
mix.options({uglify: {uglifyOptions: {compress: false, output: {comments: true}}}});
require('./node_modules/eclipsefdn-solstice-assets/webpack-solstice-assets.mix.js');
let mix = require('laravel-mix');
mix.EclipseFdnSolsticeAssets();
mix.setPublicPath('static');
mix.setResourceRoot('../');
mix.less('./node_modules/eclipsefdn-solstice-assets/less/quicksilver/styles.less', 'static/css/styles.css');
mix.webpackConfig({
resolve: {
alias: {
jquery: 'jquery/src/jquery',
},
},
});
mix.less(
'./node_modules/eclipsefdn-solstice-assets/less/quicksilver/styles.less',
'static/css/styles.css'
);
mix.js(['./node_modules/eclipsefdn-solstice-assets/js/main.js'], './static/js/solstice.js');
\ No newline at end of file
mix.js(
['./node_modules/eclipsefdn-solstice-assets/js/main.js'],
'./static/js/solstice.js'
);
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment