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

How to create dynamic google sitemap in asp.net?
Security trimming on site maps accessed via handler from Selenium2
Dynamic Site Map
google sitemap “index”: shall I add all the children too?
Sitemap in google search result
Scrapy:Sitemap spider and gzipped files
Programmatically maintaining sitemaps
Is there a way to detect sitemap, if it is not in robots.txt?
google sitemaps and custom tags
Interactive elements of a web page
Canonical, SiteMap and Index Files?
Can my google news sitemap be blank?
Hiding my sitemap.xml from non-Google
Generate website hierarchy diagram
Listing both sitemaps and sitemap index files in robots.txt?
Dynamic Sitemap in Java EE app

Categories

HOME
internet-explorer
marie
ide
locale
azure-database-mysql
bitbucket
symfony-sonata
jshell
richtextbox
docker-compose
comments
rethinkdb
suitecrm
vichuploaderbundle
google-closure-compiler
web-worker
k-means
project-structure
sonarlint
single-page-application
infinite-loop
wai-aria
jopendocument
utc
multiple-inheritance
marionette
request-uri
ocl
ios9
arp
overflow
loopback
eclipse-jdt
headphones
border-layout
libconfig
jslider
idea-plugin
wicket-tester
aura-framework
synchronized
spring-data-commons
denodo
pyopenssl
runtime-permissions
node.js-client
was
ios-keyboard-extension
apache-commons-cli
sharing
gevent
x12
settext
virtualenvwrapper
gdi
hotkeys
archiva
code-translation
trendline
videoview
ewam
cascading
computability
jcomponent
taverna
exchange-server-2007
traminer
vensim
opennebula
minko
jad
xmla
crtdbg.h
fedena
growl
indic
visual-c#-express-2010
ant-contrib
enquire.js
fastcgi-mono-server
infomaker
xrandr
http-compression
reference-manual
biztalk-deployment
microsoft-speech-platform
invalidoperationexception
netbiscuits
jquery-1.8
shapado
jquery-ui-map
scsf
sessiontracking
onunload
miniport
carbon-emacs
office-2003

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