sitemap


Publishing Middleman's sitemap


Middleman can show a sitemap under its config url when a local server is running. When publishing the static site to a CDN I cannot find anyway to access this sitemap, and I'd like to have it there for SEO purposes. I've assumed up to this point middleman includes the sitemap in the build, but I cannot find it now that I look. Assuming that's true, how can I publish the sitemap online?
While I'm a bit of a Middleman newbie, and haven't gotten around to adding a sitemap to my Middleman site, my friend uses the Middleman Search Engine Sitemap gem to generate a sitemap in his sites.
Another solution that I have seen is to use a Builder file to generate the sitemap:
Create a source file: source/sitemap.xml.builder.
xml.instruct!
xml.urlset 'xmlns' => "http://www.sitemaps.org/schemas/sitemap/0.9" do
sitemap.resources.select { |page| page.destination_path =~ /\.html/ && page.data.noindex != true }.each do |page|
xml.url do
xml.loc URI.join(settings.casper[:blog][:url], page.destination_path)
last_mod = if page.path.start_with?('articles/')
File.mtime(page.source_file).to_time
else
Time.now
end
xml.lastmod last_mod.iso8601
xml.changefreq page.data.changefreq || "monthly"
xml.priority page.data.priority || "0.5"
end
end
end

Related Links

Add blocked (via robots.txt) URLs in Sitemap?
sitemap.xml only for bots
How I can see all my last site contents (news) in Google search results?
Moving a site in webmaster tools and updating sitemaps
How to create a visual sitemap of a large existing website? [closed]
Is there a canonical list of all domain-level metadata that a site should include?
Where to place sitemap.xml in playframework 2.1 project
sitemap for domain with multilanguage site
Should sitemap must have main page url as well?
Google not indexed url
How can I hide the sitemap from public view? [closed]
Can <sitemapindex> contain both <url> and <sitemap> items?
google sitemap need all article in site or indexing latest only?
Google webmaster tools: sitemaps submitted every day (?)
Description for URL in Google Sitemap
Freebase video id [closed]

Categories

HOME
asterisk
actionscript-3
postgresql
stata
itunesconnect
system-calls
ns2
domain-driven-design
mysqli
apache-storm
dynamic
readdir
highmaps
itext7
grid
sugarcrm
aggregation-framework
foreach
rmarkdown
android-webview
webpack-dev-server
cracking
apache-httpclient-4.x
desktop-application
element
comma
logstash-configuration
opengrok
taxonomy
filehelpers
cucumberjs
aiml
xforms
minimagick
pumping-lemma
handle
ithit-webdav-server
windowserror
visual-studio-community
drombler-fx
setup-project
custom-fields
paper-trail-gem
concrete5
ios-autolayout
directions
ports
odp.net
anypoint-studio
cowboy
definition
risc
piranha-cms
riemann
playframework-1.x
photoshop-script
xamarin-test-cloud
reloaddata
chain
printer-control-language
group
zsh-completion
access-violation
netlink
queuing
kik
avi
firefox-os
sqldataadapter
magnet-uri
mojolicious
libgcrypt
transbase
jsoncpp
eula
fileinputstream
copy-on-write
crtdbg.h
dojox.grid
random-access
javadb
frisby.js
vundle
parsefloat
behance-api
debuggervisualizer
azure-caching
cvi
html5-filesystem
codio
xcode6.1-gm-seed
8-puzzle
android-library
asp.net-4.0
mmo
metapost
freeimage
correctness
report-viewer2010
openafs
big-endian
doxia
jquery-1.8
bindinglist
bash4
sqlbuddy
stl-algorithm
scsf
scriptmanager
copyfile
umfpack
netduino
n2
noise-reduction
database-agnostic
miniport
calendarextender
file-storage
atmega16
jettison
tracd

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App