From 7c06c58e629a72aeeb86fa2d87e619584354a213 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Fri, 7 Jun 2024 17:44:27 +0800 Subject: [PATCH] Use shortcodes for email links Signed-off-by: Egor Savkin --- README.md | 2 +- content/about-us/clubmate.md | 2 +- content/about-us/jobs.md | 2 +- content/experiment-control/control-loops.md | 2 +- content/experiment-control/funding.md | 2 +- content/experiment-control/resources.md | 4 ++-- content/experiment-control/sinara-core.md | 4 ++-- content/other/mixxeo.md | 2 +- content/software/smoltcp.md | 2 +- templates/includes/footer_contact_direction.html | 4 ++-- templates/page.html | 2 +- templates/publications.html | 2 +- templates/section.html | 2 +- templates/shortcodes/div.html | 2 +- templates/shortcodes/email.html | 1 + templates/shortcodes/layout_card.html | 4 ++-- templates/shortcodes/layout_centered_content.html | 4 ++-- templates/shortcodes/layout_centered_simple.html | 2 +- templates/shortcodes/layout_div.html | 2 +- templates/shortcodes/layout_funding.html | 10 +++++----- templates/shortcodes/layout_gallery.html | 2 +- templates/shortcodes/layout_html.html | 2 +- templates/shortcodes/layout_icon_label.html | 2 +- templates/shortcodes/layout_text_img.html | 4 ++-- templates/shortcodes/layout_treejs.html | 2 +- 25 files changed, 35 insertions(+), 34 deletions(-) create mode 100644 templates/shortcodes/email.html diff --git a/README.md b/README.md index a24c747..091bbbf 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Install Zola. Start: ``` - zola serve + DOMAINNAME=m-labs.hk zola serve ``` To build the .bundle.js from .jsx files: diff --git a/content/about-us/clubmate.md b/content/about-us/clubmate.md index 36cdc9a..fa3e427 100644 --- a/content/about-us/clubmate.md +++ b/content/about-us/clubmate.md @@ -18,4 +18,4 @@ Selling drinks is not our main business and only a service we do to other Club M * In case of any dispute, the seller is always right. -Contact: [sb@DOMAINNAME](mailto:sb@DOMAINNAME) +Contact: {{ email(address="sb") }} diff --git a/content/about-us/jobs.md b/content/about-us/jobs.md index 9e6f60c..40d5d00 100644 --- a/content/about-us/jobs.md +++ b/content/about-us/jobs.md @@ -83,5 +83,5 @@ Now is your chance to work on top-notch science and technology projects that get {% layout_centered_content() %} -##### Contact us at [jobs@DOMAINNAME](mailto:jobs@DOMAINNAME) or [jobs@m-labs.ph](mailto:jobs@m-labs.ph)! +##### Contact us at {{ email(address="jobs") }} or [jobs@m-labs.ph](mailto:jobs@m-labs.ph)! {% end %} diff --git a/content/experiment-control/control-loops.md b/content/experiment-control/control-loops.md index f4360fe..3db9e8e 100644 --- a/content/experiment-control/control-loops.md +++ b/content/experiment-control/control-loops.md @@ -62,7 +62,7 @@ The

- To purchase this controller, email sales@DOMAINNAME. We also offer firmware customizations and development of new features. Note that features that are not implemented in the open source code above (e.g. control from Kasli) are not supported unless purchased separately. + To purchase this controller, email {{ email(address="sales") }}. We also offer firmware customizations and development of new features. Note that features that are not implemented in the open source code above (e.g. control from Kasli) are not supported unless purchased separately.

diff --git a/content/experiment-control/funding.md b/content/experiment-control/funding.md index 39310ee..88b31a5 100644 --- a/content/experiment-control/funding.md +++ b/content/experiment-control/funding.md @@ -19,7 +19,7 @@ ARTIQ and the related components that we are developing ([Migen/MiSoC](/gateware {% layout_funding(position="center", title="Sponsors") %} -We acknowledge support from our partners below. Please get in touch ([sales@DOMAINNAME](mailto:sales@DOMAINNAME)) if you also want to move ARTIQ forward! +We acknowledge support from our partners below. Please get in touch ({{ email(address="sales") }}) if you also want to move ARTIQ forward! {% end %} diff --git a/content/experiment-control/resources.md b/content/experiment-control/resources.md index 7ebbb4c..ff121f7 100644 --- a/content/experiment-control/resources.md +++ b/content/experiment-control/resources.md @@ -114,7 +114,7 @@ template = "page.html" **Sinara hardware purchases, ports to your hardware, feature development, technical support, bugfixing** -contact [sales@DOMAINNAME](mailto:sales@DOMAINNAME) +contact {{ email(address="sales") }} We welcome inquiries from research groups of all sizes.
[See what has been funded before](/experiment-control/funding) @@ -237,6 +237,6 @@ We welcome inquiries from research groups of all sizes.
[See what has been fu {% layout_div(css="col-12 text-center") %} -Want your project listed here? Write to [sb@DOMAINNAME](mailto:sb@DOMAINNAME). +Want your project listed here? Write to {{ email(address="sb") }}. {% end %} diff --git a/content/experiment-control/sinara-core.md b/content/experiment-control/sinara-core.md index 7a54adb..7d54286 100644 --- a/content/experiment-control/sinara-core.md +++ b/content/experiment-control/sinara-core.md @@ -14,7 +14,7 @@ The first ARTIQ core devices used hardware built in-house by physicists (based o The Sinara hardware is in active development, and the latest information is available on the wiki of each project's page. Most of the hardware engineering is done at the Institute for Electronics Systems at the Warsaw University of Technology. -Kasli and EEMs can be ordered now. We can deliver a rack-mountable crate that contains all the cards, is fully tested, and is ready to be connected to your experiment and computer network. Use our [web-based configuration and ordering tool](../place-order), or contact sales@DOMAINNAME with your requirements, and we will establish a quote. +Kasli and EEMs can be ordered now. We can deliver a rack-mountable crate that contains all the cards, is fully tested, and is ready to be connected to your experiment and computer network. Use our [web-based configuration and ordering tool](../place-order), or contact {{ email(address="sales") }} with your requirements, and we will establish a quote. {% end %} @@ -297,7 +297,7 @@ The 4624 AWG "Phaser" is a quad channel 1.25 GS/s RF generator card with dual IQ We can deliver a rack-mountable crate that contains all the cards, is fully tested, and is ready to be connected to your experiment and computer network. The lead time can be as short as a few working days and we will provide assistance to help you set up your new equipment with ARTIQ via the online helpdesk. Using our AFWS tool, you can keep the firmware of your M-Labs devices up-to-date easily, and benefit from the new features we continuously develop into ARTIQ. -Use our [web-based configuration and ordering tool](../place-order), or contact sales@DOMAINNAME with your requirements, and we will establish a quote. +Use our [web-based configuration and ordering tool](../place-order), or contact <{{ email(address="sales") }} with your requirements, and we will establish a quote. {% end %} diff --git a/content/other/mixxeo.md b/content/other/mixxeo.md index 43e7bb4..d53406b 100644 --- a/content/other/mixxeo.md +++ b/content/other/mixxeo.md @@ -30,7 +30,7 @@ Built on the MiSoC and Migen technologies that or The Mixxeo supported mixing from two DVI or HDMI sources up to 720p60, with crossfade, fade to black and potentially other effects with a latency of less than two frames. -Status (Aug 2014) - Main board and gateware have been mostly functional for a while, mechanical design and manufacturing for the case/mechatronics are progressing slowly. If you have the skills and would like to help out, email [sb@DOMAINNAME](mailto:sb@DOMAINNAME) or the mailing list. +Status (Aug 2014) - Main board and gateware have been mostly functional for a while, mechanical design and manufacturing for the case/mechatronics are progressing slowly. If you have the skills and would like to help out, email {{ email(address="sb") }} or the mailing list.


diff --git a/content/software/smoltcp.md b/content/software/smoltcp.md index 0993dca..626cfdd 100644 --- a/content/software/smoltcp.md +++ b/content/software/smoltcp.md @@ -26,6 +26,6 @@ smoltcp achieves on GitHub. -**Commercial support for smoltcp is available.** Email [sales@DOMAINNAME](mailto:sales@DOMAINNAME). +**Commercial support for smoltcp is available.** Email {{ email(address="sales") }}. {% end %} diff --git a/templates/includes/footer_contact_direction.html b/templates/includes/footer_contact_direction.html index f89ebd2..c55373a 100644 --- a/templates/includes/footer_contact_direction.html +++ b/templates/includes/footer_contact_direction.html @@ -5,7 +5,7 @@
Sales inquiries

- To purchase ARTIQ Sinara hardware, software and gateware development services, or to enter a technical support agreement, write to sales@{{config.extra.domain}}. + To purchase ARTIQ Sinara hardware, software and gateware development services, or to enter a technical support agreement, write to sales@{{get_env(name="DOMAINNAME", default="m-labs.hk")}}.

@@ -15,7 +15,7 @@
Commercial technical support

- If you need help setting up ARTIQ hardware purchased from us, or if you have a commercial technical support agreement with us, email us anytime at helpdesk@{{config.extra.domain}}. + If you need help setting up ARTIQ hardware purchased from us, or if you have a commercial technical support agreement with us, email us anytime at helpdesk@{{get_env(name="DOMAINNAME", default="m-labs.hk")}}.

Community support
diff --git a/templates/page.html b/templates/page.html index 686c6f9..d730eef 100644 --- a/templates/page.html +++ b/templates/page.html @@ -57,7 +57,7 @@ {% block main_content %} {% if page and page.content %} - {{ page.content | replace(from="DOMAINNAME", to=config.extra.domain) | safe }} + {{ page.content | safe }} {% endif %} {% endblock %} diff --git a/templates/publications.html b/templates/publications.html index 64a10f8..bf21f41 100644 --- a/templates/publications.html +++ b/templates/publications.html @@ -7,7 +7,7 @@
{% block main_content %} {% if page and page.content %} - {{ page.content | replace(from="DOMAINNAME", to=config.extra.domain) | safe }} + {{ page.content | safe }} {% endif %}
diff --git a/templates/section.html b/templates/section.html index b537547..55753de 100644 --- a/templates/section.html +++ b/templates/section.html @@ -12,7 +12,7 @@
{% if section.extra.title %} -

{{ section.extra.title | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }}

+

{{ section.extra.title | markdown | safe }}

{% endif %} diff --git a/templates/shortcodes/div.html b/templates/shortcodes/div.html index dbb0484..8af633e 100644 --- a/templates/shortcodes/div.html +++ b/templates/shortcodes/div.html @@ -1,3 +1,3 @@
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | safe }} + {{ body | safe }}
\ No newline at end of file diff --git a/templates/shortcodes/email.html b/templates/shortcodes/email.html new file mode 100644 index 0000000..f6f1181 --- /dev/null +++ b/templates/shortcodes/email.html @@ -0,0 +1 @@ +{{address}}@{{get_env(name="DOMAINNAME", default="m-labs.hk")}} \ No newline at end of file diff --git a/templates/shortcodes/layout_card.html b/templates/shortcodes/layout_card.html index 8d286ff..6655c4b 100644 --- a/templates/shortcodes/layout_card.html +++ b/templates/shortcodes/layout_card.html @@ -18,7 +18,7 @@ {% endif %}
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe }}
@@ -32,7 +32,7 @@
{% endif %} - {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe }}
diff --git a/templates/shortcodes/layout_centered_content.html b/templates/shortcodes/layout_centered_content.html index b7d0ff3..29f631f 100644 --- a/templates/shortcodes/layout_centered_content.html +++ b/templates/shortcodes/layout_centered_content.html @@ -4,11 +4,11 @@ {% if card %}
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe }}
{% else %}
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe }}
{% endif %} diff --git a/templates/shortcodes/layout_centered_simple.html b/templates/shortcodes/layout_centered_simple.html index d7d91f9..082d372 100644 --- a/templates/shortcodes/layout_centered_simple.html +++ b/templates/shortcodes/layout_centered_simple.html @@ -1,5 +1,5 @@
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe}}
\ No newline at end of file diff --git a/templates/shortcodes/layout_div.html b/templates/shortcodes/layout_div.html index 116edb0..6f2c959 100644 --- a/templates/shortcodes/layout_div.html +++ b/templates/shortcodes/layout_div.html @@ -1,5 +1,5 @@
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe }}
diff --git a/templates/shortcodes/layout_funding.html b/templates/shortcodes/layout_funding.html index 1b7b30d..167381e 100644 --- a/templates/shortcodes/layout_funding.html +++ b/templates/shortcodes/layout_funding.html @@ -11,14 +11,14 @@
- {% if title %}
{{ title | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }}
{% endif %} + {% if title %}
{{ title | markdown | safe }}
{% endif %} {% if icon %} {{ icon }} {% endif %} -

{{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }}

+

{{ body | markdown | safe }}

@@ -37,7 +37,7 @@ style="height: 2rem;"/> {% endif %} -

{{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }}

+

{{ body | markdown | safe }}

@@ -56,8 +56,8 @@
- {% if title %}

{{ title | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }}

{% endif %} -

{{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }}

+ {% if title %}

{{ title | markdown | safe }}

{% endif %} +

{{ body | markdown | safe }}

diff --git a/templates/shortcodes/layout_gallery.html b/templates/shortcodes/layout_gallery.html index add514c..d108dd0 100644 --- a/templates/shortcodes/layout_gallery.html +++ b/templates/shortcodes/layout_gallery.html @@ -4,7 +4,7 @@
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe }} diff --git a/templates/shortcodes/layout_html.html b/templates/shortcodes/layout_html.html index 709442a..fa2a62b 100644 --- a/templates/shortcodes/layout_html.html +++ b/templates/shortcodes/layout_html.html @@ -1,5 +1,5 @@
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | safe }} + {{ body | safe }}
diff --git a/templates/shortcodes/layout_icon_label.html b/templates/shortcodes/layout_icon_label.html index 89f8248..77c4b78 100644 --- a/templates/shortcodes/layout_icon_label.html +++ b/templates/shortcodes/layout_icon_label.html @@ -3,7 +3,7 @@

- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe }}

\ No newline at end of file diff --git a/templates/shortcodes/layout_text_img.html b/templates/shortcodes/layout_text_img.html index a093a84..9dd910a 100644 --- a/templates/shortcodes/layout_text_img.html +++ b/templates/shortcodes/layout_text_img.html @@ -4,7 +4,7 @@
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe }}
@@ -40,7 +40,7 @@
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | markdown | safe }} + {{ body | markdown | safe }}
diff --git a/templates/shortcodes/layout_treejs.html b/templates/shortcodes/layout_treejs.html index 411c4cd..c341367 100644 --- a/templates/shortcodes/layout_treejs.html +++ b/templates/shortcodes/layout_treejs.html @@ -2,7 +2,7 @@
- {{ body | replace(from="DOMAINNAME", to=config.extra.domain) | safe }} + {{ body | safe }}