Skip to content

Commit

Permalink
Merge pull request #618 from ArmDeveloperEcosystem/main
Browse files Browse the repository at this point in the history
Merge to production
  • Loading branch information
pareenaverma authored Dec 1, 2023
2 parents 65c8b58 + 9efd2e7 commit cf635a4
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 14 deletions.
11 changes: 7 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM ubuntu:latest

ARG HUGO=hugo_0.111.2_linux-amd64
ARG HUGO_VER=v0.111.2
ARG TARGETPLATFORM

# general setup
RUN apt-get update && \
apt-get -y install vim wget sudo git

RUN wget https://github.com/gohugoio/hugo/releases/download/$HUGO_VER/$HUGO.deb && apt-get -y install ./$HUGO.deb
RUN case ${TARGETPLATFORM} in \
"linux/amd64") HUGO=hugo_0.111.2_linux-amd64 ;; \
"linux/arm64") HUGO=hugo_0.111.2_linux-arm64 ;; \
esac \
&& HUGO_VER=v0.111.2 \
&& wget https://github.com/gohugoio/hugo/releases/download/${HUGO_VER}/${HUGO}.deb && apt-get -y install ./${HUGO}.deb

# User account
ENV USER=ubuntu
Expand Down
12 changes: 12 additions & 0 deletions .devcontainer/build-dev-container.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
docker build --platform linux/amd64 -t armswdev/learn-dev-container:amd64 .
docker build --platform linux/arm64 -t armswdev/learn-dev-container:arm64 .

docker push armswdev/learn-dev-container:amd64
docker push armswdev/learn-dev-container:arm64

docker manifest create armswdev/learn-dev-container:latest \
--amend armswdev/learn-dev-container:arm64 \
--amend armswdev/learn-dev-container:amd64

docker manifest push --purge armswdev/learn-dev-container:latest

6 changes: 2 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
"name": "Arm Learning Paths",

"build": {
"dockerfile": "Dockerfile"
},
"image": "docker.io/armswdev/learn-dev-container:latest",

"forwardPorts": [1313],

"remoteUser": "ubuntu",

"postStartCommand": "nohup bash -c 'hugo server --baseUrl=/ --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 &' "
"postStartCommand": "nohup bash -c 'hugo ; bin/pagefind --site public --output-subdir ../static/pagefind ; hugo server --baseUrl=/ --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 &' "

}
3 changes: 3 additions & 0 deletions content/install-guides/cmsis-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
### Include vendor name where appropriate
title: CMSIS-Build

# cbuild is now part of CMSIS Toolbox making this obsolete
draft: true

### Optional additional search terms (one per line) to assist in finding the article
additional_search_terms:
- cbuild
Expand Down
8 changes: 4 additions & 4 deletions content/install-guides/cmsis-toolbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,21 @@ If `cmake` is earlier than 3.25.2, or `ninja` is earlier than 1.10.2, you will n
#### cmake
```command
sudo apt remove -y cmake
sudo snap install cmake
sudo snap install cmake --classic
```
#### ninja
```command
sudo apt remove -y ninja-build
wget http://mirror.archlinuxarm.org/aarch64/extra/ninja-1.11.1-3-aarch64.pkg.tar.xz
tar -xf ninja-1.11.1-3-aarch64.pkg.tar.xz
sudo tar -xf ninja-1.11.1-3-aarch64.pkg.tar.xz -C /
```

## Download

Download and unpack the latest install file from GitHub. Downloads are provided in the [Releases area](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases) of the repository.

```console
wget https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases/download/2.0.0/cmsis-toolbox-linux-arm64.tar.gz
wget https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases/download/2.2.0/cmsis-toolbox-linux-arm64.tar.gz
tar -xf cmsis-toolbox-linux-arm64.tar.gz
```

Expand Down Expand Up @@ -141,7 +141,7 @@ cbuild Hello.Release+AVH.cprj
```
The build will proceed and generate an executable image:
```output
info cbuild: Build Invocation 2.0.0 (C) 2023 Arm Ltd. and Contributors
info cbuild: Build Invocation 2.2.0 (C) 2023 Arm Ltd. and Contributors
M650: Command completed successfully.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: "Common questions"

weight: 10

layout: "learningpathall"
---

### Why is the search box missing on the home page?

The search index is not automatically generated, but you can add it to enable the search box.

Refer to the information about the search box in the [Learning Path setup](../setup/#search) section.

### Why are my Learning Path pages in the wrong order?

Each markdown file has a value called weight.

The _index.md is always first (weight: 1). You should start your next page with weight: 2 and continue to increment the weight values on each new page.

The weight values determine the page order.


### Why do I have multiple Back and Next buttons on my page?

If you see multiple buttons on a single page, it means you have 2 markdown files with the same weight.

Modify the weight values to be unique and the extra buttons will disappear.
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,39 @@ Open a browser and go to [http://localhost:1313](http://localhost:1313)

You are now ready to edit markdown files and view the results on the Hugo server.

## Enable the search box on the home page {#search}

When you run `hugo server` you will not see the search box on the home page. You don't need to do anything for the search feature to find your content, but you may want to enable the search box and test it during your development.

The search feature requires search index data to be created. If the data is available, the search box will appear on the home page.

To see the search box run the following commands before you run `hugo server` as described above:

```console
hugo
pagefind --site "public" --output-subdir ../static/pagefind
```

Refer to the script `hugo-server.sh` at the top of the repository. If you have `pagefind` installed on your computer you can run the script to create the search index and start the server.

There are also executables for Pagefind in the `bin/` directory.

| Pagefind executable | OS |
| ------------------------------------------ | ------------------------|
| `bin/pagefind` | Linux (x86) |
| `bin/pagefind.aarch64` | Linux (aarch64) |
| `bin/pagefind.arm64` | macOS (Apple Silicon) |
| `bin/pagefind.exe` | Windows (x86) |


For example, if you are working on Arm Linux you generate the search index using:

```console
bin/pagefind.aarch64 --site "public" --output-subdir ../static/pagefind
```

{{% notice Note %}}
The search index does not automatically update as you enter content. You can run `hugo` and `pagefind` again and restart `hugo server` to update the search index with your current content.
{{% /notice %}}

The next section will cover how to create and format Learning Paths.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ <h2 id="about-marker">About this {{$table_name}}</h2>
Last updated:
</td>
<td id="last-updated" class="td-metadata-value">
<span><i class="fa-light fa-calendar-days fa-sm"></i></span>&nbsp; {{partial "server-side-processing/update-update-time.html" .}}
<span><i class="fa-light fa-calendar-days fa-sm"></i></span>&nbsp;
{{/* If learning path, obtain last modified date from any LP file; install guide just display from this file. */}}
{{ if $is_learning_path}}
{{partial "server-side-processing/update-update-time.html" .}}
{{else}}
{{ .Lastmod.UTC.Format "2 Jan 2006" }}
{{end}}
</td>
</tr>
{{ if .Params.test_maintenance}}
Expand Down Expand Up @@ -169,7 +175,13 @@ <h2 id="about-marker">About this {{$table_name}}</h2>
</tr>
<tr>
<td id="last-updated" class="td-metadata-value margin-l-24">
<span><i class="fa-light fa-calendar-days fa-sm"></i></span>&nbsp; {{ .Lastmod.UTC.Format "2 Jan 2006" }}
<span><i class="fa-light fa-calendar-days fa-sm"></i></span>&nbsp;
{{/* If learning path, obtain last modified date from any LP file; install guide just display from this file. */}}
{{ if $is_learning_path}}
{{partial "server-side-processing/update-update-time.html" .}}
{{else}}
{{ .Lastmod.UTC.Format "2 Jan 2006" }}
{{end}}
</td>
</tr>
{{ if .Params.test_maintenance}}
Expand Down

0 comments on commit cf635a4

Please sign in to comment.