Fix localmenus, language switcher, Event/News archives

This commit is contained in:
delliott 2024-08-23 09:53:44 +02:00
parent c529d86e57
commit c132ebfef4
Signed by: delliott
SSH Key Fingerprint: SHA256:h5IC6Ec/o6ypmpM7ZdRqULGyG8dz4Jr5K192BAWAjoo
4 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,8 @@
<xsl:otherwise>
<xsl:element name="li">
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="$urlprefix"/><xsl:value-of select="/buildinfo/@filename"/>.<xsl:value-of select="@id"/>.html</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="$urlprefix"/>/<xsl:value-of select="substring-after(substring-after(/buildinfo/@filename,'/'),'/')"/>.<xsl:value-of select="@id"/>.html</xsl:attribute>
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:element>
</xsl:element>

View File

@ -36,4 +36,4 @@ ARCH_SOURCES := $(foreach year,$(ARCH_YEARS),$(year)/index.sources)
all: $(ARCH_SOURCES)
$(ARCH_SOURCES): %.sources:
@echo "* Creating $@"
@echo "events/$(dir $@)event-*:[]\nevents/$(dir $@).event-*:[]\nevents/.localmenu:[]\n" > $@
@echo "fsfe.org/events/$(dir $@)event-*:[]\nfsfe.org/events/$(dir $@).event-*:[]\nfsfe.org/events/.localmenu:[]\n" > $@

View File

@ -36,7 +36,7 @@ ARCH_SOURCES := $(foreach year,$(ARCH_YEARS),$(year)/index.sources)
all: $(ARCH_SOURCES)
$(ARCH_SOURCES): %.sources:
@echo "* Creating $@"
@printf "news/$(dir $@)news-*:[]\nnews/$(dir $@).news-*:[]\nnews/.localmenu:[]\n" > $@
@printf "fsfe.org/news/$(dir $@)news-*:[]\nfsfe.org/news/$(dir $@).news-*:[]\nfsfe.org/news/.localmenu:[]\n" > $@
# -----------------------------------------------------------------------------
# Remove generated .xml files where original .xhtml file does not exist anymore

View File

@ -13,9 +13,8 @@ echo "* Updating local menus"
# -----------------------------------------------------------------------------
# Get a list of all source files containing local menus
# -----------------------------------------------------------------------------
all_files=$(
find * -name "*.xhtml" -not -name "*-template.*" \
find . -name "*.xhtml" -not -name "*-template.*" \
| xargs grep -l "</localmenu>" \
| sort
)
@ -68,7 +67,7 @@ for dir in ${!files_by_dir[@]}; do
file="${basefile}.en.xhtml"
fi
xsltproc \
--stringparam "link" "/${basefile}.html" \
--stringparam "link" "$(echo "$basefile"| sed 's/^\.\/[^\/]*//').html" \
build/xslt/get_localmenu_line.xsl \
"${file}"
echo ""