You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Semb Wever (Jira)" <ji...@apache.org> on 2022/01/08 16:58:00 UTC
[jira] [Comment Edited] (CASSANDRA-16761) New Cassandra Website and Documentation
[ https://issues.apache.org/jira/browse/CASSANDRA-16761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17380763#comment-17380763 ]
Michael Semb Wever edited comment on CASSANDRA-16761 at 1/8/22, 4:57 PM:
-------------------------------------------------------------------------
the antora built version of the new website design is on staging: https://cassandra.staged.apache.org/
following manual steps were required, after the antora generation…
{code}
# push to staging, after having built with antora
git switch asf-staging
# copy everything to content/ directory
mkdir -p content/doc
cp -r site-content/build/html/* content/
# move around the in-tree docs
rm -fR content/doc/4.0 content/doc/4.0.0 content/doc/3.11 content/doc/3.11.11 content/doc/stable content/doc/latest content/doc/trunk
cp -r content/Cassandra/3.11 content/doc/3.11.11
mv content/Cassandra/3.11 content/doc/
cp -r content/Cassandra/4.0 content/doc/4.0.0
cp -r content/Cassandra/4.0 content/doc/4.0.1
cp -r content/Cassandra/4.0 content/doc/stable
cp -r content/Cassandra/trunk content/doc/4.1
cp -r content/Cassandra/trunk content/doc/latest
mv content/Cassandra/4.0 content/doc/
mv content/Cassandra/trunk content/doc/
# update the .htaccess file
nano content/.htaccess
# remove hardcoded domain name, and empty domain names
for f in $(grep -rl "https://cassandra.apache.org/" content/) ; do sed -i "s/https:\/\/cassandra.apache.org\//\//g" $f ; done
for f in $(grep -rl "href=\"//" content/) ; do sed -i "s/href=\"\/\//href=\"\//g" $f ; done
git add content
git commit content
git push origin asf-staging
{code}
The {{.htaccess}} addition is
{code}
RedirectMatch 301 "^/$" "/_/index.html"
RewriteCond %{REQUEST_URI} !^/doc/.*
RewriteCond %{REQUEST_URI} ^(.*)/$
RewriteRule ^(.*)/$ /_/$1.html [R=301,L]
# temp – while in-tree antora are building to /Cassandra/
RewriteCond %{REQUEST_URI} !^/doc/.*
RewriteCond %{REQUEST_URI} ^/Cassandra/(.*)$
RewriteRule ^/?Cassandra/(.*)$ /doc/$1 [R=301,L]
# development in-tree docs have been moved to cassandra-website
RewriteCond %{REQUEST_URI} ^/doc/latest/development/(.+).html [NC]
RewriteRule ^/?doc/latest/development/(.+).html$ /_/development/$1.html [R=301,L]
# redirects to new antora in-tree docs
RewriteCond %{REQUEST_URI} !^/doc/latest/index.html [NC]
RewriteCond %{REQUEST_URI} !^/doc/latest/cassandra [NC]
RewriteRule ^/?doc/latest/(.+)$ /doc/latest/cassandra/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !^/doc/stable/index.html [NC]
RewriteCond %{REQUEST_URI} !^/doc/stable/cassandra [NC]
RewriteRule ^/?doc/stable/(.+)$ /doc/stable/cassandra/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !^/doc/4.0/index.html [NC]
RewriteCond %{REQUEST_URI} !^/doc/4.0/cassandra [NC]
RewriteRule ^/?doc/4.0/(.+)$ /doc/4.0/cassandra/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !^/doc/3.11/index.html [NC]
RewriteCond %{REQUEST_URI} !^/doc/3.11/cassandra [NC]
RewriteRule ^/?doc/3.11/(.+)$ /doc/3.11/cassandra/$1 [R=301,L]
{code}
was (Author: michaelsembwever):
the antora built version of the new website design is on staging: https://cassandra.staged.apache.org/
following manual steps were required, after the antora generation…
{code}
# push to staging, after having built with antora
git switch asf-staging
# copy everything to content/ directory
cp -r site-content/build/html/* content/
# move around the in-tree docs
rm -fR content/doc/4.0 content/doc/4.0.0 content/doc/3.11 content/doc/3.11.11 content/doc/stable content/doc/latest content/doc/trunk
cp -r content/Cassandra/3.11 content/doc/3.11.11
mv content/Cassandra/3.11 content/doc/
cp -r content/Cassandra/4.0 content/doc/4.0.0
cp -r content/Cassandra/4.0 content/doc/4.0.1
cp -r content/Cassandra/4.0 content/doc/stable
cp -r content/Cassandra/trunk content/doc/4.1
cp -r content/Cassandra/trunk content/doc/latest
mv content/Cassandra/4.0 content/doc/
mv content/Cassandra/trunk content/doc/
# update the .htaccess file
nano content/.htaccess
# remove hardcoded domain name
for f in $(rg -l "https://cassandra.apache.org/" content/_) ; do sed -i '' 's/https:\/\/cassandra.apache.org\//\//g' $f ; done
#
for f in $(rg -l "href=\"//" content/_) ; do sed -i '' 's/href=\"\/\//href=\"\//g' $f ; done
git add content
git commit content
git push origin asf-staging
{code}
The {{.htaccess}} addition is
{code}
RedirectMatch 301 "^/$" "/_/index.html"
RewriteCond %{REQUEST_URI} !^/doc/.*
RewriteCond %{REQUEST_URI} ^(.*)/$
RewriteRule ^(.*)/$ /_/$1.html [R=301,L]
# temp – while in-tree antora are building to /Cassandra/
RewriteCond %{REQUEST_URI} !^/doc/.*
RewriteCond %{REQUEST_URI} ^/Cassandra/(.*)$
RewriteRule ^/?Cassandra/(.*)$ /doc/$1 [R=301,L]
# development in-tree docs have been moved to cassandra-website
RewriteCond %{REQUEST_URI} ^/doc/latest/development/(.+).html [NC]
RewriteRule ^/?doc/latest/development/(.+).html$ /_/development/$1.html [R=301,L]
# redirects to new antora in-tree docs
RewriteCond %{REQUEST_URI} !^/doc/latest/index.html [NC]
RewriteCond %{REQUEST_URI} !^/doc/latest/cassandra [NC]
RewriteRule ^/?doc/latest/(.+)$ /doc/latest/cassandra/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !^/doc/stable/index.html [NC]
RewriteCond %{REQUEST_URI} !^/doc/stable/cassandra [NC]
RewriteRule ^/?doc/stable/(.+)$ /doc/stable/cassandra/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !^/doc/4.0/index.html [NC]
RewriteCond %{REQUEST_URI} !^/doc/4.0/cassandra [NC]
RewriteRule ^/?doc/4.0/(.+)$ /doc/4.0/cassandra/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !^/doc/3.11/index.html [NC]
RewriteCond %{REQUEST_URI} !^/doc/3.11/cassandra [NC]
RewriteRule ^/?doc/3.11/(.+)$ /doc/3.11/cassandra/$1 [R=301,L]
{code}
> New Cassandra Website and Documentation
> ---------------------------------------
>
> Key: CASSANDRA-16761
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16761
> Project: Cassandra
> Issue Type: Epic
> Components: Documentation/Website
> Reporter: Anthony Grasso
> Assignee: Anthony Grasso
> Priority: High
> Fix For: 4.0.x
>
>
> This epic captures the work associated with the development of the new Cassandra website and documentation.
> Work to create the new website and documentation will be broken up as follows:
> * Proof of concept - CASSANDRA-16029
> * Website concept and design - CASSANDRA-16115
> * Develop tooling to render new website and documentation - CASSANDRA-16066
> * Create website content that will be rendered by new tooling - CASSANDRA-16762
> * Create Cassandra documentation content that will be rendered by new tooling - CASSANDRA-16763
> It is expected that the new website and documentation will be in asciidoc format and rendered using Antora.
> Antora is purpose built for rendering versioned documentation to HTML. In addition it allows rendering customisations via Java Script which may be useful when rending the website.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org